General advice for the US here, as provided by a lawyer friend after a beer or two pre-Covid.
First, you have to know if you are in custody. This is not as easy as you may think[1].
You say: "Am I being detained? Am I free to go?"
If yes, leave, and find a lawyer. If the answer is no (or non-committal), you are under custody of the police. You will likely be forced to disclose your name but that and maybe your address should be what you disclose[2].
Now you need to make it clear that you are invoking your right to remain silent. Current jurisprudence around Miranda[3] makes it clear that is something you must actively invoke. It is not enough to remain silent, that will not stop an interrogation.
You say: "I will not answer any questions until I have a lawyer present".
Those two statements + your name are all you say. That is it.
As far as getting a lawyer, you'll have an opportunity to contact one after the interview has been stopped. If you need a public defender you can ask for one at that time but you'll likely be better off contacting your state bar association and asking for a referral.
[1]: https://en.wikipedia.org/wiki/Terry_v._Ohio
[2]: https://en.wikipedia.org/wiki/Hiibel_v._Sixth_Judicial_Distr...
If they arrest you, you inform them you request counsel. That's the Sixth Amendment. Invoking the Fifth doesn't get you a lawyer, but saying you request a public defender will speed things up.
In the US, a person’s rights are NOT specific with regard to jurisdiction.
One’s rights are enshrined in what are colloquially referred to as Miranda Rights (issued as a Miranda Warning upon arrest) and they protect all people detained by the police in the US. [0]
> You have the right to remain silent and refuse to answer questions.
> Anything you say may be used against you in a court of law. You have the right to consult an attorney before speaking to the police and to have an attorney present during questioning now or in the future.
> If you cannot afford an attorney, one will be appointed for you before any questioning if you wish.
> If you decide to answer questions now without an attorney present, you will still have the right to stop answering at any time until you talk to an attorney.
> Knowing and understanding your rights as I have explained them to you, are you willing to answer my questions without an attorney present? [1]
[0] http://www.mirandawarning.org/whatareyourmirandarights.html
How does one actually _get_ a lawyer on the scene? If I haven't been arrested, am I eligible for a public defender? Do I need to already have one on retainer? I recognize the value of having one, but if a police officer came to my door right now, I don't know what to do if I don't already have a lawyer.