Hey there!
You will need to restore your Mac using Apple Configurator on a second Mac. You will need the following:
- The latest version of Apple Configurator installed on a Mac running macOS 12.4 or later
- Internet access
- You may need to configure your web proxy or firewall ports to allow all network traffic from Apple devices to Apple’s network 17.0.0.0/8. For more information on the ports used by Apple products, see the Apple Support article Use Apple products on enterprise networks. For more information on whether your network uses a web proxy or firewall, consult your router manual or your internet provider.
- A supported USB-C to USB-C charge cable, such as the one sold by Apple (may not be available in all countries or regions) or a supported USB-A to USB-C cable
- The USB-C cable must support both power and data. Thunderbolt 3 cables aren’t supported.
Then, follow the steps here:
Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support.
If you don't have access to a second Mac, contact Apple Support:
Contact - Official Apple Support
If you'd prefer, if you purchased your Mac recently from Apple, you may be able to exchange it for a new one:
Returns & Refunds - Shopping Help - Apple
You can also call Apple and see if you can exchange it:
Contact - How to Contact Us - Apple
Hope this helps!
-Jack