The truth is, it was both, and equally. Some immigrants thrived, a lot instead suffered then died.
In our written US history we of course play up the good side (like anyone would), those immigrants who thrived, who got rich, on our Statue of Liberty to immigrants..'.I hold my lamp beside the golden door'.
But it was only 'a golden door' for 65% of immigrants, for the other 35% a tunnel to Hell, sent their by rich capitalists, businessmen, corporations, street gangs, landlords ,slavers, whorehouses, mafia, etc. We in America tend to remember the 65% who made it and deny the 35% who didn't, and that they ever existed. That instead is 'written off' to alcoholism, disease, laziness, etc.
That is because then, as now USA is a very harsh country. There are the 'winners' and the 'losers', there's a fiction that everyone is in fair competition, but it's not fair, the rich, big business, the beautiful, the strong hold the cards, they control and rig the game.
Whereas in 1910 as an immigrant to the US you had a 2 in 3 chance 'of making it', now as an immigrant you have a 1 in 6 chance of making it.
'Making it' is an American slang term, from the Scotch/ British Protestant 'work ethic'. That is, as a poor immigrant....hard work, suffering, sacrifice is good for your soul. Work for those richer than you, endless work will set you free, to maybe allow you to be rich someday (1 chance in 20).
It was both. Substantial numbers of immigrants gave up and went back home. The non English speaking immigrants mostly lived in very densely populated urban ghettos, where crime was very high. Lack of English language skills made it difficult for people to get hired, to understand the requirements of the law, and to navigate city bureaucracies. There were ethnic organizations founded to help immigrants, but even so they faced serious discrimination and prejudice.
Opportunity often comes only to those who overcome hardships. The gains are worth the risks. Success is 10% inspiration and 90% perspiration.
I'm tying to make it clear, opportunity and hardship are not opposite sides, they are not mutually exclusive. You should be deciding on how overcoming hardships led to those opportunities, not which side prevailed.
The land of opportunity,many immigrants where coming from the ol' world,in search of work,but you should have in mind that the 20th century its the 1900's and most of the immigrants where coming in the 19th century with the expansion of the USA towards the west.