Rooting is a slightly separate thing from sideloading a custom rom, rooting gives apps you give permission to access to system files whereas sideloading a rom replaces the system files but doesn’t necessarily give you root access. Both involve a similar process of unlocking the bootloader, installing a custom recovery and flashing a file so it is easy to get the two things mixed up.
Rooting is a slightly separate thing from sideloading a custom rom, rooting gives apps you give permission to access to system files whereas sideloading a rom replaces the system files but doesn’t necessarily give you root access. Both involve a similar process of unlocking the bootloader, installing a custom recovery and flashing a file so it is easy to get the two things mixed up.