There are many ways to buy it, the safest one is probably going to crypto atm (they mostly support only bitcoin) and buy it with cash, then use one of many swaps to xmr. You can find them on kycnot . me, very useful website for finding non-kyc apps. When buying these cryptos you need to have wallets to store them, for bitcoin you should probably use electrum, and for monero i suggest feather wallet. Theoretically you can buy bitcoin with kyc because after monero swap and churning it, it's basically impossible to trace it to you. Churning is creating multiple monero wallets, dividing the balance in few parts and sending it between the addresses. It potentialy prevents connecting your xmr with the btc transaction via the swap service.