If you need to change/reset the root password on raspberry pi os (like after first boot), run this command
sudo passwd root
in your terminal. It will allow you to change the root password. You can then logout from the normal user, and log in as root user using the password you would have set while runninghte commnad listed above.
Be careful while using the root login on Raspberry Pi OS, or for that matter any Linux (or similar) OS, as it can lead to bricking your Pi.