Original question didn’t refer to people in the USA who may get an SSN. It was about establishing a US credit history for foreigners who don’t have US addresses, bank accounts, credit cards, mortgages, car loans, etc.
You don’t establish a credit report in the US by getting an SSN and telling the credit reporting agencies about it. The private credit reporting agencies collect data reported to them. Those reports come from US banks, credit card companies, and residential leasing companies. Foreign banks and credit issuers do not report activities of foreigners to US credit agencies.
Without an SSN or TIN and a US address none of the reporting will tie together, even if foreign banks and card companies reported it.
Contrary to what you imply, only US citizens, permanent residents, and foreigners holding specific visas (O-1, H1-B, TN, for example) can get an SSN.
https://www.ssa.gov/number-card/request-number-first-time
Foreigners with no US address and visa that gives them the right to reside in and work in the US will struggle to open a US bank account or get a US-issued credit card.
If US banks, credit card companies, and credit reporting companies saw profit and a clear path through government regulation they would already welcome foreigners to open accounts and get into debt. That hasn’t happened, partly because of government regulations and partly because of jurisdictional issues.
Marqeta issues co-branded credit cards. Not really relevant to the original question. Starting up a credit card, which implies a bank as a partner, isn’t something anyone can just do because of a SAAS that will help with co-branded cards.
American Express issues credit cards to foreigners, generally high net worth individuals. UK-based Nova Credit seems to work in the space the original poster asked about.