A strange issue… Luckily I think I can help you there though :-)
Instructions:
1: Restart your Mac in recovery mode. Press Command + R immediately after starting up. (Intel) Start up your Mac and continue to hold the power button as your Mac starts up. When you see the “Loading startup options” text let go of the power button then choose “options“ and continue. (Apple Silicone)
2: Enter your password in the user field, if necessary.
3: Select Disk Utility in the four options, then click Continue.
4: Select the disk closest to the top of the menu bar, then click Erase. In the pop-up select your desired name in the first field, APFS in the second, and GUID Partition Map in the third. Then click Erase.
5: Quit Disk Utility (Command + Q or select Disk Utility at the menu bar then choose Quit)
6: Choose “Reinstall macOS <Your macOS Name>”
7: Click Continue.
8: Click Agree on the Terms & Conditions and if there is a Pop-up click Agree on that, too.
9: Select the disk that you formatted a few minutes ago, then click Continue.
10: Wait for your computer to Install and Restart. Note: Your Mac may get hot when Installing and Restarting.
11: Now your computer has been reset. You can sell it, give it away, or simply start off fresh.
If this doesn’t work, take your Mac to Apple. You may need your original receipt as proof of purchase.
Hope I could help!