2016 Macbook SSD not able to format Laptop was working fine, then one day I turned it on and it booted up to the Question mark folder. In Disk Utility I tried to erase it just reinstall Catalina. When I try to erase it, it gets stuck on Creating Partition Map and then restarts to the Question Mark folder again. Tried resetting PRAM and SMC. Also tried diskutil in terminal as well as Disk Utility GUI,
This might be a hardware error. Maybe try to install a different version of macos. Another option is that you Boot on an external drive and try to go from there.