Over the years I've dbeen playing with Raspberry Pi's ut only recently started to document what I have done or know.
First of all it is assumed that you have powered up a RPI 5 with a blank sd card and connected the internet via the ethernet.
The last point is not mandatory if you wish to use wifi. On initial boot the screen will show the boot or if you hold down the "shift key" it will change to downloading the boot files. It will also ask for other details like username and password to use and wifi settings amongst others. It will take a while dependng on you internet bandwidth. The Boot / boots have now complete and you have a working PI.
Go to the command line via the terminal and set up root access "sudo passwd" enter the password (twice). Now you can login to root easily from the normal user by using the "su" command