You erased the operating system; not a problem. Here are the steps you can try:
- Restart your MacBook and hold down Command+Option+R keys until you see the Apple logo. This will boot your MacBook into macOS Recovery.
- In macOS Recovery, select Disk Utility.
- In Disk Utility, select the startup disk and click on the Erase button.
- In the Erase window, select APFS as the format and click on the Erase button.
- Once the disk is erased, quit Disk Utility and select Reinstall macOS.
- Follow the on-screen instructions to reinstall macOS.
If you don't have a Time Machine backup, you can also try to reinstall macOS from an external drive. Here are the steps:
- Download the macOS installer from the App Store.
- Create an external bootable installer using the macOS installer.
- Restart your MacBook and hold down Option key until you see the bootable disk icon.
- Select the bootable disk icon and press Enter.
- Follow the on-screen instructions to reinstall macOS.
If you are still unable to fix your MacBook, you can take it to an Apple Authorized Service Provider for help.