Hello, Grithe18.
It's good to hear you've recovered your lost Mac.
Here's something that may or may not help at this point. From an Apple Support document regarding a lost Mac :
click> https://support.apple.com/en-us/HT204756
"How do I unlock my Mac?
After you locate your Mac, you can unlock it with your passcode on iCloud.com. Make sure to use the passcode that you created when you locked it with Find My, not your device passcode.
Here's how to see the passcode that you used to lock your Mac:
- Sign in to icloud.com/find.
- Select your Mac from the Devices menu.
- Select Unlock. After you follow the steps to verify your identity, you'll see the passcode that you need to unlock your Mac.
You can look up your passcode for a limited time. If you forget your passcode or can't verify your identity to see it, take your Mac to an Apple Authorized Service Provider along with your proof of purchase."
At this point you can try to restore your iMac using the Recovery partition - restart your iMac while holding ⌘R.
If this is unsuccessful, then a visit to your AASP with the purchase receipt is probably in order.