How can I format-erase my main disk through single user mode? I cannot log into my computer anymore and internet recovery is extremely slow, how can i delete the partition and recover to factory stage with single user mode?
Also would erasing it recover my macos to Sierra? I am having troubles with Catalina right now but I am failing to boot my pc.

I did apple diagnostic test but there were no flaws.
You can't realistically recover your OS to factory state from single user mode.  When you boot into single user mode (assuming you enter single user mode with the old style ⌘-S) you have no GUI and a very minimal set of terminal commands.

If you want to reinstall macOS you need to either boot from an external drive (so the internal disk is offline) or from recovery (which loads a minimal OS into RAM).

If you boot from an external disk could install whatever version of macOS you have - but you would need to download the installer from the app store first.

The version you install from recovery depends on the type of recovery to boot into - see How to reinstall macOS from macOS Recovery


  
    1. Start up from macOS Recovery
  
  
  To start up from macOS Recovery, turn on your Mac and immediately
  press and hold one of the following combinations on your keyboard.
  Command-R is generally recommended, especially if your Mac was never
  upgraded to macOS Sierra 10.12.4 or later.
  
  Command (⌘)-R Reinstall the latest macOS that was installed on your Mac (recommended).
  
  Option-⌘-R Upgrade to the latest macOS that is compatible with your Mac.
  
  Shift-Option-⌘-R Reinstall the macOS that came with your Mac, or the closest version still available.


The simplest would be to restart holding Option-⌘-R if you want Catalina