My general impression is that the U.S. used to have more vending machines in general ~30-40 years ago. I remember soda machines being outside of every grocery store, but I don't see that anymore. Newspaper vending machines also used to be common. But I don't have any data to back that up.
https://www.atlasobscura.com/articles/vending-machines-snack...
In Germany there are bars that still have them, but I think they're pretty rare now even there. The one used by one of my friends who smokes a lot even requires old DM coins, which you can get at the bar.
LA is stuck in a bit of a time portal, though. Local mom and pop shops reign supreme still, especially ethnic stores, and there are even payphones still in frequent use by bus stops.
In Japan they are out in the open in non descript corners and alleyways, although there is usually a streetlight.
Then again, this is the same country where it's sufficient to self-certify by tapping a button that you're over 18 when buying hard liquor at the 7-11.
For high school student or below, smoking is problem (So vending machine must have authenticate feature like card(Taspo) or face age recognition) but drinking is looks like not popular but still considered as problem.