The safer way of using an ATM is making sure you never ever get money out from a machine that is readily accessible to anyone (aka: outside). Generally ones indoors are safer, not 100% obviously but your chances are better. If you’re totally unsure and want to be certain you don’t get skimmed go to a bank and get money out that way. Or you can do cashback if that’s an option, or buy a Visa giftcard at a store.