The rules are probably different now, but this is my story from 24 years ago.
I decided that I wanted to live with my American girlfriend in the US. Being from the UK, I could already get a 90 day visa by default, but I wanted to make it official and legal, so I applied for a 6 month extended visa.
I could have lied, visited on a temp visa and just stayed longer than 90 days (in fact I found out later that a former schoolmate of mine did that very thing, and it seemed to allow him to game the system and make it work, although the relationship didn't last). I didn't want to do it illegally because I just knew that somehow I'd get caught and it'd put me in a worse position.
Part of that process was to prove to the American government that I could support myself for those 6 months and therefore not need to work illegally. I tried and failed, my extended visa was denied.
Due to a fun quirk in the system, getting denied a visa meant I was no longer eligible for the 90 day visa and it essentially barred me from entering the US ever again based on my current lack of abilities to support myself without becoming an "illegal".
At the time I wasn't sure I wanted to get married, we'd been dating for about 8 months. So instead my girlfriend came to live with me in the UK. Which was easy enough, she got the same reciprocal visa for 90 days, which gave us time to decide if marriage was the answer.
We could have just stayed in the UK, but the cost of living was much higher and my girlfriend was missing her friends and family.
To me marriage was a lifetime commitment, I wasn't about to fake it and hope that I could convince the INS that it was true love and not some attempt to game the US immigration system.
Eventually we found that our love was for real and we investigated the best next step, since I couldn't legally enter the country without proving I could support myself; we decided to apply for a K-1 fiance visa.
Once you meet the criteria you are required to marry within 6 months of entering the country and then you can be given a work permit and start the green card application process.
The K-1 application process was long and annoying. Lots of documentation needed to be provided and one lasting memory I have was one of the last steps. I had to get a chest X-ray and get a blood test, the latter was to prove I wasn't HIV+.
We hired an immigration firm in the US to help guide us through the process. It wasn't free, but it wasn't financially prohibitive.
Once approved, which was never a sure thing, I traveled to the US. Got married within a few months and a few months later got my work permit. The green card application process was long and annoying too. It took several years to get it approved.
Apparently once you get a green card you didn't technically need to renew it, even though it has an expiration date.
But once the expiration date loomed, I didn't want to risk it. Our marriage was working and we have 3 kids, so we considered renewing it anyway in case they changed the rules.
Instead though, after about 18 or so years, I just decided to become a citizen instead. It would avoid worrying about a green card and ought to assure me that there would never be a reason why I would be forced away from my family due to some bureaucratic quirk.
Becoming a citizen, compared to the K-1 visa and green card, was embarrassingly simple. While some Americans might fail the questions, the citizenship test seemed like it was geared to trap someone who had no knowledge about the US. In fact they give applicants a pamphlet that lists all the answers and you just have to remember them. They ask 10 questions, if you get 8 (or was it 6) right, you pass. I got the first bunch right and they didn't ask all 10.
I remember that one of the questions was "who is the speaker of the house?". The pamphlet had the answer but I already knew it was John Boener because of all the jokes on the Daily Show. So if you want to pass the citizenship test, might want to bone up on comedy news.
There were some warnings when I became a citizen, at the time I was not allowed to join an anti-democratic group like the communist party, and I could lose my citizenship if I refused to come before Congress if subpoenaed. Those rules seemed to only apply to the first 5 years after becoming a citizen.
One worry I have today, despite being a European descended white male, is the current animosity in the incoming US government in 2025. Despite following all the rules, I worry that there's still a chance that I could lose my citizenship because of something as banal as having a Harris/Walz sign in my yard.
So, since the rest of the world isn't as paranoid about immigrants as the US is (although the UK is plenty paranoid enough), my wife and I decided to also get UK passports for my US born children; just in the office chance that the government sworn to uphold and protect the constitution (and by proxy, the people of the USA), decided not to and put my family at risk of separation.
tl;dr. The rules are probably different in some ways now. Maybe you can get away with just coming to the country, getting married and hope it works for you. I wouldn't risk it.
Unfortunately, it can really depend on the country you are coming from (which can also mean the color of your skin).