To root Motorola Moto G Stylus 2023, you will need: A Windows PC or laptop with the ADB & fastboot tools installed.
The latest Magisk Manager APK.
The Moto G Stylus 2023 firmware for your phone (the same version which is installed on your phone).
Instructions:
Unlock the bootloader of your Moto G Stylus 2023.
Enable USB debugging on your Moto G Stylus 2023.
Connect your Moto G Stylus 2023 to your PC using a USB cable.
Copy the Magisk Manager APK to your Moto G Stylus 2023.
Install the Magisk Manager APK on your Moto G Stylus 2023.
Open Magisk Manager and tap on the Install button.
Select "Select and Patch a File" and choose the Moto G Stylus 2023 firmware file.
Magisk will patch the firmware file. Once the patching process is complete, Magisk will save the patched firmware file to your Moto G Stylus 2023.
Reboot your Moto G Stylus 2023 into fastboot mode.
Flash the patched firmware file to your Moto G Stylus 2023 using the following command:
fastboot flash boot magisk_patched.img
Once the firmware has been flashed, reboot your Moto G Stylus 2023.
Open Magisk Manager and follow the on-screen instructions to complete the rooting process.
Once you have finished these steps, your Moto G Stylus 2023 will be rooted.