If you want to avoid receiving AirDrops, especially from random people, open the AirDrop settings on your device (under General on iOS and in Mac’s control center at the top of the Mac screen) and select the option for “Contacts Only.”