Photos won't open because Mac thinks they're an app downloaded from an unidentified developer
I just bought a new MacBook Air, but my Nikon D40 doesn't connect with it, so I put my new photos on my old MacBook Pro, and then used Airdrop to send them over to my Air 10 at a time.
When I opened the first 40 pictures in Photos, I had no problem.
Then I set Photos to be the default for opening photos. (Not sure if this is relevant.)
When I tried to open the last batch of photos, I got an error message saying "DSC_1234.nef" (for instance) "...cannot be opened because it is from an unidentified developer. macOS cannot verify that this app is free from malware."
I can override, but it only lets me override one at a time. When I go into security settings, it likewise only lets me override one block at a time, even if I had 100 photos selected when I tried to open.
What's the problem here? What caused it all of a sudden? How do I override this for all future photos?
MacBook Air, macOS 13.4