When you are lawfully stamped and your status written in your passport. (Note that passports aren't always stamped by the officer if using an APC kiosk (which, at most airports, many VWP nationals can), but even then you've been lawfully admitted - you're admitted when the electronic admission record has been created). The term lawfully is very important.
To be clear, wherever you are in the country and however you crossed, you are or at least in theory supposed to be accorded basic and universal human rights. For example if hypothetically before crossing immigration/passport control you get murdered, the USA will prosecute the murderer to the fullest extent of the law.
When it comes to immigration benefits and law however, until you cross immigration/passport control (and are admitted lawfully) you have not been admitted into the USA. For this reason you have very limited legal standing with respect to immigration law and benefits.
See INA §101(a)(13)(A)
(13) 2/ (A) The terms "admission" and "admitted" mean, with respect to
an alien, the lawful entry of the alien into the United States
after inspection and authorization by an immigration officer.
Thus after you cross (and not just cross but cross lawfully) immigration/passport control, then you have all the immigration rights. To make it even more complex, note that that even fter you cross, if for example it is realized that the immigration officer admitted you by mistake, you are not lawfully admitted. For example if you had previously committed a crime of moral turpitude (which makes you ineligible for a visa) but had mistakenly been awarded a visa by a consular officer based on your lies, and you used that visa to enter the USA through passport control, your entry was void ab initio because you were inadmissible from the very beginning and hence according to the court you were not lawfully admitted.