How do I factory reset my IMAC 2022?

How do I factory reset my IMAC 2022?
Here’s how to do it: Shut down your Mac. Turn it back on. Press and hold Command ⌘ + Option + P + R for about 20 seconds (your Mac should restart during this time).For macOS Catalina or later:

Choose Apple menu > System Preferences.
Click Apple ID.
Then Select Overview in the sidebar and click Sign Out.

Here’s how to do it: Shut down your Mac. Turn it back on. Press and hold Command ⌘ + Option + P + R for about 20 seconds (your Mac should restart during this time).

For macOS Catalina or later:

  1. Choose Apple menu > System Preferences.
  2. Click Apple ID.
  3. Then Select Overview in the sidebar and click Sign Out.