Yes, it’s almost certainly linked to quality of schooling and exposure to those types of problems, amongst other things, see the Flynn Effect.
https://en.wikipedia.org/wiki/Flynn_effect