The fix for me (iPhone 12, iOS 15.6) was to go into Settings -> General -> AirDrop and change the setting from Contacts Only to Everyone. After that, scanning of NFC tags worked again. Switched the setting back to Contacts Only and tried scanning the NFC tag again and it still worked. I assume this is a bug.