Here are some examples of things that some foreign visitors do in the U.S. that might get them in legal trouble. For pretty much every item, you can find a news article about a tourist actually doing this.
Physically fighting or trying to bribe a police officer. Many of these infractions are more likely to result in a police officer trying to issue you a "ticket", rather than trying to handcuff you. A "ticket" or a citation is a summons, typically saying that that the police officer accuses you of an infraction, and you can later choose to agree (plead guilty), and pay a fine (sometimes as much as a few hundred dollars) by mail or wire, or, if you don't like that, then you can later come in person before a judge and argue that you are not guilty. You can't pay a fine on the spot to a police officer. Sometimes it is just a written warning without a fine. Taking the ticket does not mean that you agree to plead guilty. If instead you try to physically fight a police officer, or to run away, or to offer a bribe, then you will get handcuffed, may get physically hurt, and may spend some time locked up. If you don't respond to a summons, then eventually a court may issue a warrant for your arrest. Thus, people sometimes get arrested eventually, for example, as the consequence of parking a car where parking is disallowed, getting a ticket with a fine, and not responding to it.
urinating in public. This is normal in many other countries, and we sometimes see foreigners doing it right in the streets in NYC. In the U.S. you will get arrested, charged with indecent exposure, and required to register as a sex offender. Defecating in the streets is also a stereotypical behavior in some countries.
Police in some jurisdictions sometimes arrest people for spitting in the street, for example New York City 181: Protection of Public Health https://www.nyc.gov/assets/doh/downloads/pdf/about/healthcode/health-code-article181.pdf
being naked where you shouldn't be. While it's legal for women to be topless anywhere in New York, in some other states not wearing a top, even on a beach or in a park or breastfeeding, may result result in an indecent exposure arrest as above. And don't go bottomless, including changing into your swimsuit, unless you are at a bona fide nude beach.
sexually harassing people. "Courtship" or "flirting" customs normal in some other countries, such as physically grabbing, kissing, or slapping strangers, are likely to result in an arrest. Example: https://www.usatoday.com/story/travel/flights/2019/05/21/united-airlines-passenger-alleges-sexual-assault/3751023002/ Insisting on "talking dirty" to people who don't want you to talk to them may result in an arrest.
beating the help, when not satisfied with their service, is common in many countries. For example, Megan Markle famously threw a tea cup at the staff in Australia, which would have resulted in assault and battery charges in the U.S. https://www.mirror.co.uk/news/royals/meghan-markle-threw-cup-tea-27504108 Slapping a Starbucks barista, even though they messed up your order, will get you arrested.
Bothering protected wildlife. Examples: https://apnews.com/article/lifestyle-science-travel-environment-and-nature-hawaii-70eb51d61c261cb1db85a0aa308beba8 , https://nypost.com/2023/03/30/hawaii-authorities-say-33-swimmers-were-harassing-dolphins/ , https://www.cbsnews.com/colorado/news/simon-langer-cacti-seeds/
leaving a child unattended in a pram in the street, while you go inside a store, or locked up in your hotel room while you hang out. Example: https://nypost.com/2017/11/25/i-went-to-jail-for-leaving-my-baby-outside-a-restaurant This may be normal in other countries, but in the U.S. this is considered too dangerous for the child.
jaywalking refers to pedestrian walking in or crossing a road in violation of the traffic rules, which vary a bit, but typically: if a traffic light is red, then wait for it to turn green. If you see a cross-walk, marked with stripes, nearby, then cross there. If a road has a sidewalk for pedesrians, then walk there, rather than where cars or bikes can hit you. A police officer seeing a pedestrian violating the rules, especially if there are cars in the road, just might decide to issue a fine, which may eventually lead to an arrest, for example https://nypost.com/2014/01/19/cops-beat-elderly-man-after-he-jaywalked/ , http://news.bbc.co.uk/2/hi/6251431.stm . Here is an old public service ad https://youtu.be/YUz8zINDdMU illustrating what jaywalking is.
if a visitor has a medical prescription for "controlled substance" (painkillers, anti-anxiety, etc), then they should keep the pills in their original package and/or carry around a prescription or a letter from their doctor (in English). People got arrested for possessing, for example, a few Xanax pills, which had been prescribed to them, in a plastic bag and not being able to show a prescription to a police officer who found them.
laws regarding marijuana and other recreational drugs are in the state of flux. Some states have recently decriminalized marijuana, while the federal government hasn't. When in doubt, just say no.
Walking or biking on a high-speed highway, where posted signs say "no pedestrians or bicycles".
Driving drunk or under drug influence. The definition of "drunk" varies by state - as low as 0.1% blood alcohol content in New Jersey and Pennsylvania, higher in most other states. Drinking a single beer may render you legally drunk in some states, but not others.
traffic laws are similar, but not identical in all the states. For example, the rules on when turning on red is allowed vary. When in doubt, not turning on red is always OK.
In most but not all states, having an open container of alcohol in a car is illegal, even if a passenger is drinking from it, rather than the driver.
some highways have a minimum speed posted. Drive in the rightmost lane with hazard lights lit on if you insist on going slower, but you still may get ticketed.
Using an unapproved container, such as a plastic bag, to refuel your car, should it run out of gasoline in the middle of the road.
Fireworks are a traditional part of celebrating the Independence Day and other events. In some states, anyone can buy fireworks in a store and set them off. Some other states ban fireworks, except for professionals. For example, buying fireworks in New Jersey and bringing them to New York would cause problems.
Climbing off-limits structures, such as the Brooklyn Bridge, where posted signs say "no climbing". Example: https://gothamist.com/news/argentinian-tourist-arrested-for-climbing-brooklyn-bridge
drinking alcohol in public, even if the container is concealed in a brown paper bag, is against the rules almost anywhere.
smoking tobacco where you shouldn't. That includes parks and beaches in some states.
trying to smuggle food https://www.cbp.gov/newsroom/local-media-release/minnesota-cbp-stops-deadly-introduction-bushmeat-us banned in the U.S.
picking flowers / shrubs / shrooms where you shouldn't. Many foreigners feel entitled to collect flowers from obviously well cared for flower beds in people's front yards or public parks with millions of visitors a year.
many Americans are very fond of their flag, which they proudly display on many occasions, and the national anthem, which they perform on many occasions. Disrespecting the flag or the anthem may be legal, but may not always be safe. https://www.youtube.com/watch?v=-eGh7BSiOPk , https://nypost.com/2023/05/02/people-standing-for-national-anthem-horrifies-progressives-in-viral-video/
last but not least - littering. Foreigners throw their garbage on the ground when they walk the streets or out car windows while they drive.