Has political psychology revealed some universal differences between
young and old people's attitudes that would explain big factors such
as the identification on the left-right and globalist-nationalist
spectrums?
No.
Political science data does not support this hypothesis.
Generally speaking, data tracking the political views of cohorts of people over time in a country support the conclusion that people acquire a set of political beliefs around the time that they become young adults. Their political views become much less malleable after that.
People's political views can change (and it is slightly more likely for people to become more conservative than more liberal with age), especially in the wake of dramatic political or geopolitical events, but inertia is powerful as well.
For example, the abstract of one widely cited political science article from the year 2020 explains:
Folk wisdom has long held that people become more politically
conservative as they grow older, although several empirical studies
suggest political attitudes are stable across time. Using data from
the Michigan Youth-Parent Socialization Panel Study, we analyze
attitudinal change over a major portion of the adult life span. We
document changes in party identification, self-reported ideology, and
selected issue positions over this time period and place these changes
in context by comparing them with contemporaneous national averages.
Consistent with previous research but contrary to folk wisdom, our
results indicate that political attitudes are remarkably stable over
the long term. In contrast to previous research, however, we also find
support for folk wisdom: on those occasions when political attitudes
do shift across the life span, liberals are more likely to become
conservatives than conservatives are to become liberals, suggesting
that folk wisdom has some empirical basis even as it overstates the
degree of change.
Incidentally, this imprinting in young adulthood isn't particular to political views. Marketing professionals, for example, focus heavily on capturing brand loyalty in this time frame because this is when the purchasing habits of most people are formed for many kinds of brands and people's brand preferences are much harder to change later in life.
You even see this phenomenon in science and academia, where bold new ideas are often adopted widely by scientists and scholars who receive their advanced education in their discipline as these ideas gain currency, while the old guard of the scientific and academic establishment will not infrequently cling to older ideas that have been superseded until death. In the sciences, this is known as Planck's principle based upon the following quotation from Max Planck's "Scientific Autobiography" (1950):
A new scientific truth does not triumph by convincing its opponents
and making them see the light, but rather because its opponents
eventually die and a new generation grows up that is familiar with it
...
An important scientific innovation rarely makes its way by gradually
winning over and converting its opponents: it rarely happens that Saul
becomes Paul. What does happen is that its opponents gradually die
out, and that the growing generation is familiarized with the ideas
from the beginning: another instance of the fact that the future lies
with the youth.
But, the collective political views of a generation in one country, and those in another, and the shifts to new generations later on in their lives, are not universal or uniform.
The long term trend in most places is for political views to get more liberal over time, which is why younger people can seem more liberal on average than older people. This gives rise to the conventional wisdom that people get more conservative as they get older. But, in fact, people's political views actually are fairly static over time after imprinting in young adulthood and it is the overall society that gets more liberal, not the aging individuals getting more conservative, in most cases.
For example, U.S. society has become much more liberal over the last fifty years which explains a lot of the apparent conservatism relative to contemporary norms of older Americans.
But this isn't always true.
The generation that came of age before the 1979 Iranian revolution, for example, was much more liberal than the one that came of age afterwards.
Similarly, in South Korea today, young people, especially young men, are much more conservative than the older generation. In part, because the older generation experienced a long run of rapidly rising prosperity and economic development, while the younger generation has seen that growth level off and young men find it increasingly hard to get married and have kids because far more young men are inclined to pursue that life course than young women in South Korea (which has the fewest children per woman per lifetime of any place in the world).
Germans who came of age before the Treaty of Versailles were more liberal than those who came of age politically while its crippling economic impact on Germany influenced their lives and perceptions.
So, rather than being a universal and global difference due to age rooted in the fundamental psychology of aging, generational differences in political views are primarily a lagging indicator of past political trends, driven by inertia and the young adult timing of the politically formative period for most people.