"But then I checked the website of the American visa authority and read that if I had a work offer in writing, then I can get the visa. Do I understand correctly?" , you said you didn't know. Could you please find an answer from someone who knows or who can explain?
I am from America and conversely I have never worked in America, seeking instead to
leave the country.
So I can’t give you any certainties on American laws, but my experience working overseas
might be similar to how it works in America.
When I came to Japan from Thailand, the company wanting to hire me prepared a letter for immigration stating their intent to hire me, how I knew about Japanese law and promised not to break any, etc. (I did jay-walk once though).
It wasn’t clear whether this was required by law (and I doubt it is) or just a good idea, but in any case it wouldn’t hurt.
And even in the case of Japan, such a letter is not a guarantee that you will get in. It is just helpful and a way to cover all your bases (though if you are a normal human without a criminal record, there is little chance you would be denied if a company is trying to hire you).
Ultimately, this really doesn’t matter.
If a company wants to hire you, they will know what needs to be done with immigration.
Like in Japan, even if a letter from a company has any meaning to immigration, it is absolutely no guarantee that you will actually be accepted by immigration (though the risk of not being accepted is low if all the paperwork is in order).
The hard part is finding a company that will hire you, and you should be more concerned with that.
I got hired overseas with no prior experience, but I wasn’t applying in America.
For America to do that is likely extremely rare.
However, the only way to guarantee that it eventually does happen is to try, try, and try again.
Then get frustrated and give up.
And then try some more. Until it happens.
L. Spiro