Are you planning to sell the laptop or to just perform a clean install of macOS so you can have a fresh system for yourself? The reason for asking is if you are planning to sell or get rid of it, then you need to first disassociate your AppleID and accounts from it before erasing the system for a clean install. See this Apple article for details:
What to do before you sell, give away, or trade in your Mac - Apple Support
If you are planning to perform a clean install for your own use, then you can boot into Internet Recovery Mode (Command + Option + R) to access the online macOS installer where you can use Disk Utility to erase the internal drive and reinstall macOS. I recommend erasing the whole physical SSD (Intel Macs only) so a fresh partition table is created. Within Disk Utility while booted to the installer, you may need to click "View" and select "Show All Devices" so the physical drive appears on the left pane of Disk Utility. Erase the whole physical SSD (Intel Macs only) as GUID partition and APFS (top option). If successful, close Disk Utility and select "Reinstall macOS".
If your laptop is still able to boot normally, then I would recommend creating a bootable macOS USB installer so you have more options available in case you have issues with Internet Recovery Mode as that requires a good Internet connection.
Create a bootable installer for macOS - Apple Support