Stephan Zweig describes this new sense of nationalism as state policy after WWI in the 'World of Yesterday'; actually before the great world one could travel without passports or identification papers at all - that serves him as the detail that serves to explain the big thing.

https://ia801609.us.archive.org/21/items/in.ernet.dli.2015.1...

"Nationalism emerged to agitate the world only after
the war, and the first visible phenomenon which this intellectual
epidemic of our century brought about was xenophobia : morbid
dislike of the foreigner, or at least fear of the foreigner. The world
was on the defensive against strangers, everywhere they got short
shrift. The humiliations which once had been devised with criminals
alone in mind now were imposed upon the traveller, before and
during every journey. There had to be photographs from right
and left, in profile and full face, one’s hair had to be cropped
sufficiently to make the ears visible; fingerprints were taken, at first only the thumb but later all ten fingers ; furthermore, certificates of health, of vaccination, police certificates of good standing,
had to be shown ; letters of recommendation were required, invitations to visit a country had to be procured ; they asked for the
addresses of relatives, for moral and financial guarantees, questionnaires, and forms in triplicate and quadruplicate needed to be filled
out, and if only one of this sheaf of papers was missing one was lost.

Petty details, one thinks. And at the first glance it may seem
petty in me even to mention them. But our generation has foolishly wasted irretrievable, valuable time on those senseless pettinesses. If I reckon up the many forms I have filled out during
these years, declarations on every trip, tax declarations, foreign
exchange certificates, border passes, entrance permits, departure
permits, registrations on coming and on going ; the many hours
I have spent in anterooms of consulates and officials, the many
inspectors, friendly and unfriendly, bored and overworked, before
whom I have sat, the many examinations and interrogations at
frontiers I have been through, then I feel keenly how much human
dignity has been lost in this century which, in our youth, we had
credulously dreamed of as one of freedom, as of the federation of
the world. The loss in creative work, in thought, as a result of
those spirit-crushing procedures is incalculable. Have not many of
us spent more time studying official rules and regulations than works
of the intellect ! The first excursion in a foreign country was no
longer to a museum or to a world-renowned view, but to a consulate, to a police office, to get a “permit" When those of us
who had once conversed about Baudelaire’s poetry and spiritedly
discussed intellectual problems met together, we would catch ourselves talking about affidavits and permits and whether one should
apply for an immigration visa or a tourist visa ; acquaintance with
a stenographer in a consulate who could cut down one’s waiting-
time was more significant to one’s existence than friendship with
a Toscanini or a Rolland. Human beings were made to feel that
they were objects and not subjects, that nothing was their right but
everything merely a favour by official grace. They were codified,
registered, numbered, stamped and even today I, as a case-hardened
creature of an age of freedom and a citizen of the world-republic
of my dreams, count every impression of a rubber-stamp in my
passport a stigma, every one of those hearings and searches a
humiliation. They are petty trifles, always merely trifles, I am
well aware, trifles in a day when human values sink more rapidly
than those of currencies. But only if one notes such insignificant symptoms will a later age be able to make a proper clinical record
of the mental state and mental disturbances with which our world
was seized between the two World Wars.