Levels of Formality with Strangers?

Hi,

I'm a beginner and have started conversation practice with native speakers, I'm also planning to speak with locals at least a little bit when I go on vacation to Japan! I'm having trouble with deciding what level of formality to make my conversations.

I know some level of keigo is required to not sound rude, however I've also heard that if you're too informal you sound unnatural or like you're reading off a textbook.

So where's the line with a stranger who you don't know very well (or at all)? Like do you just attach です or ます to most things and you're good? ik there are limits to this (like you can't say お前あほです to a stranger) but are slang/colloquialisms like めっちゃ and なんか alright? How about あたし?

Thanks!

by unreal_housewife