Best Ways to Get Root Access
There are multiple ways to get root access to your device. First by exploiting or by using 3rd party recovery. Most of the times, people use the latter. This is because exploits are hard to find and not always there is an exploit for every device.
Before you start rooting process, make sure to backup your important data.
Rooting using TWRP
Enable developer settings by going to settings > About and tap the build number 7 times.
Head back to developer options and check USB debugging.
Now head back to settings > security and enable unknown sources.