-5101 error on Internet Recovery
In the past, a similar range of error codes has been network related errors, so if your firewall/router/DNS is filtering Apple network IP (perhaps relating to OCSP shenanigans or just running something like PiHole) you might retry your installation from a very open network. Another thing to try would be a different network connector and reboot your home router / modem network setup to be sure it’s in a clean state.
Mostly, that error is designed to get you to Customer Support however, so starting that chat might be worthwhile if you don’t feel like troubleshooting this without vendor notes on what that error code signifies.

https://support.apple.com/

It’s also seldom popular to just wait a day, since you likely had a reason to recover your mac, but many problems do sort themselves out when it is server side and your process is correct. Without experiments, though, it’s hard to know which situation you face.