Sorry, but I have to admit I wasn’t sure of the steps. Joseph Keller’s list makes it easy to recover.
If you’ve encountered a problem with macOS, the solution might be to reinstall the system on your Mac. This can be done by any Mac owner, but it can be a little bit complicated. You’ll need to put your Mac into macOS Recovery, which gives you tools to diagnose problems on your Mac, as well as reinstall the operating system.
I’ve never had to do that, but I have an old Mac mini I’m using for testing. The step-by-step works and that makes it worth so make sure to bookmark it.