Chosen Solution
Someone rebooted my iMac A1419 and it is now asking for some code or pin when I switch it on
Someone set a firmware password on your system! Set a firmware password on your Mac. In newer systems you’ll need to visit an Apple Store with proof of ownership to get them to clear it. It’s also possible your system is iCloud locked by the previous owner, if you bought the system used. Contact the seller to get them to clear the lock otherwise get your money back.