Worth noting the other defences that are easy to overlook, because they are behavioural rather than anatomical.
Seeking shade in the middle of the day, covering up, and simply disliking the feeling of burning are all real protections, and every human society in a sunny climate developed clothing and shade practices. Discomfort is itself an adaptation — it is the signal that stops you before the damage gets worse.
Modern life removes a lot of that. Sunburn on a beach holiday takes hours to hurt, by which time it has happened.