Overall, U.S. rules are saner than some other countries, e.g. https://theculturetrip.com/europe/articles/11-crazy-ways-to-get-arrested-in-europe/
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.
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.
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 unless you are at a bona fide nude beach.
sexually harassing people. "Courtship" customs normal in some other countries, such as physically grabbing, kissing, or slapping strangers, is 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/
leaving a child unattended in the street, while you go inside a store. 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.
Walking or biking on a high-speed highway, where posted signs say "no pedestrians or bicycles".
Driving drunk or under drug influence.
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. You are more likely to be just fined than detained / handcuffed.
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.
last but not least - littering. Foreigners throw their garbage on the ground when they walk the streets or out car windows while they drive.