[Moto G Stylus 5G] n6bhu:
When planning to root a phone my best experiences have come from scouting the internet for whatever information I could find and comparing it among the others -- somebody always seems to forget to include something! Also -- pace yourself. Don't be in too big of a hurry. Think about what you've done so far and digest it -- then move ahead to the next step.

I will draft the steps from my notes for both phones ('kiev' & 'pnang') and post them shortly; meanwhile, after checking a few websites I found some instructions (see below) that were clear enough for me to follow:

How to Root Motorola Moto G 5G 2023 XT2313 Easily [Simple Steps] | Android Biits

Steps to root Motorola Moto G 5G 2023 XT2313 (pnangn) effortlessly without TWRP Recovery. Dear folks, you have to download Magisk v26.1 apk file for rooting

androidbiits.com

If you don't find them confusing then give it your best shot. First, grab the stock OEM firmware for your phone (in my case it was 'RETAIL US' so I downloaded 'RETUS'):

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com

Also, check the the date of your most recent update and make use of the firmware that corresponds to your phone -- be sure that you don't use an earlier release than the most recent update of your phone.

You want the stock ROM/firmware specifically for the 'boot.img' file -- unzip the downloaded file and copy the 'bot.img' file to your phone. Assuming that you already have Magisk27 installed on your phone (it's just an APK and you can get it most anywhere, including PreyStore), follow the instructions for installation and patch the 'boot.img' file with Magisk (it's far easier than it sounds).

Unlock & Load! (Unlock your bootloader & flash.) I'm guessing this is by now familiar to you -- if this is new to you, I can recap with more detail. You can acquire some data about your phone (copy & paste it from your screen into a textfile so you'll have some reference information in case you need it later; I do this before every major step so I have some data to refer to in case I miss something):

debian ~$ fastboot getvar all

Now would be a good time to copy the patched 'boot.img' (it'll have a goofy name like "boot_patched2600.img") back your desktop so you can flash it.

Motorola should give you your unlock-code -- so do it:

debian ~$ fastboot oem unlock P5562JGWVGI55INVB6YB

(bootloader) Bootloader is unlocked!

OKAY [ 10.529s]

Finished. Total time: 10.529s

Check your phone now and save the data:

debian ~$ fastboot getvar all

Double-check the Magisk instructions for installation -- they will tell you how to flash, etc.

Installation

The Magic Mask for Android

topjohnwu.github.io

I am assuming that your device has a/b partitions (and the "getvar all" will most certainly tell you that) -- I copied the patched 'boot_patched2600.img' file back to my (Debian 11) desktop into its own directory; re-named it 'boot.img' and then flashed my device:

debian ~$ fastboot flash boot_a boot.img <= the one you patched

debian ~$ fastboot flash boot_b boot.img

Reboot and cross your fingers:

debian ~$ fastboot reboot

Run Magisk and you should find a rooted Moto G 5G in the palm of your hand. Keep in mind that nobody seems to have a ROM for these phones yet; which doesn't mean that the fun can't begin before then -- find yourself some Magisk modules and install them:

Magisk Modules Repo - #1 Trusted Source Of the Best Modules - Androidacy

The Androidacy Magisk Modules Repo is your go-to source for reliable, secure magisk modules and KernelSU Modules to enhance your android.

www.androidacy.com

IzzyOnDroid Magisk Repository

This is a repository of open-source Magisk modules run by IzzyOnDroid.

apt.izzysoft.de

I would definitely start by installing the anti-bootloop module. The SSH & Busybox modules are also a must. I've taken screenshots for each module installation to refer to later if needed (and they also make great wallpaper, people trip-out when they happen to see my phone and ask "wow, what kind of phone is that?") Good luck, and just take your time, you'll do fine. I'll be hangin' around. Ciao☮