Exiting out of router/switch initial config without rebooting device?

in CCNA & CCENT
I have done all the exercises from a study book I got for the CCENT exam on a network simulator I downloaded online that came with my study guide. Now I am going back and trying to learn everything on the actual Cisco equipment. I got a CISCO router and Switch I bought online that I am playing with.
My question is when I am in the initial router/ switch configuration and for whatever reason I want to get out of that initial configuration screen is there any command I can do to start over? I tried a lot of commands that work once your past that initial configuration and in the router> prompt, but they don't seem to work in that initial configuration screen.
I read online to get out of it and restart the initial configuration dialog menu to reboot the router/switch. I tried that and it works, but is there an easier way? Like a simple command I can type to restart it.
I am talking about when the router /switch asks for a hostname, passwords, what line you want to connect to like: vlan1, FastEthernet 0/0, what IP address you will use, etc.
If I messed up on one of those prompts and answered accidentally "yes" instead of a "no" or accidentally made a typing error and want to redo the initial configuration process is there any command I can type besides rebooting the router / switch?
My question is when I am in the initial router/ switch configuration and for whatever reason I want to get out of that initial configuration screen is there any command I can do to start over? I tried a lot of commands that work once your past that initial configuration and in the router> prompt, but they don't seem to work in that initial configuration screen.
I read online to get out of it and restart the initial configuration dialog menu to reboot the router/switch. I tried that and it works, but is there an easier way? Like a simple command I can type to restart it.
I am talking about when the router /switch asks for a hostname, passwords, what line you want to connect to like: vlan1, FastEthernet 0/0, what IP address you will use, etc.
If I messed up on one of those prompts and answered accidentally "yes" instead of a "no" or accidentally made a typing error and want to redo the initial configuration process is there any command I can type besides rebooting the router / switch?
... the world seems full of good men--even if there are monsters in it. - Bram Stoker, Dracula
Comments
No one uses the intital setup wizard with Cisco equipment. Once you have been doing it for a while you get into a flow
of setting up all the basic stuff like passwords, hostname, banners, VTY's, AAA and so on. Once you start doing it for a
a living you normally do this all one time and build a template that you copy and paste. I built and deployed over 300 routers
in 2017 for my company and it would be awful to have to type the config in over and over every time but I could if I needed to.
I would start with this book https://www.amazon.com/Routing-Switching-Portable-Command-Guide/dp/1587204304 and build your skills from there.
Being a skilled Cisco guy means you can get into a Router and Switch and clean up a dirty config. I would practice with Packet Tracer on building your skills because repitition is needed and real equipment takes to long to clear your configs and reload.