Not sure what you're aiming to get out of this comparison. Software engineers make quite a bit more at prestigious tech companies than they do at prestigious finance firms in NYC, and prestigious finance firms in NYC extensively recruit people from outside the US. Even if you want to compare engineers in tech to bankers in finance, I'm not sure Goldman is paying all that much better than OpenAI these days.
Why do people think Goldman pays software developers so well? They do not. They pay whatever is required compared to their competition (mostly other ibanks). There is a tiny sliver (less than 5%) of the dev staff who work in front office and are called "Strats". (Some other banks have "Strats" [Morgan?] or put you into a quant team to pay you more [JPM/UBS/etc].) They make about 25-50% more money compared to vanilla software devs in the IT division.
The job of the high paid people in finance at prestigious firms is to look nice in an expensive suit. Know many people in tech with those qualifications?
I'd be good at it but I won't get hired cause I didn't go to the right boarding school.
Tech has its barriers too. Most people I've met in tech come from relatively rich families. (Families where spending $70k+/yr on college is not a major concern for multiple kids - that's not normal middle class at all even for the US)
Regarding the first sentence, it is already true for software developers. You can (and probably will) make more money at FAANG compared to global ibanks in NYC.
People in tech are so quick to shoot themselves in the foot.