You don't have to root your device for debloating.
System apps can be "uninstalled" from adb shell
adb shell pm disable --user 0 <pkgname>
(actually that will disable the app. Do this again after each factory reset)
If your device is rooted with Magisk you can remove apps from system (overlay).
Just create some empty files for the file/directory you want remove
where DEBLOAT is the id name of your Magisk module and module.prop is the module info
name=my first module
version=0.0.0 pre alpha
description=just remove some of my system apps
If you want you can create a Magisk flashable zip for your module, so you have it handy in case you need it again.
Additional explanation quoted from the Magisk Developer Guides:
How to remove a file systemless-ly? To actually make the file disappear is complicated (possible, not worth the effort). Replacing it with a dummy file should be good enough! Create an empty file with the same name and place it in the same path within a module, it shall replace your target file with a dummy file.
Same as mentioned above, actually making the folder disappear is not worth the effort. Replacing it with an empty folder should be good enough! A handy trick for module developers is to add the folder you want to remove into the
REPLACE list within
customize.sh. If your module doesn’t provide a corresponding folder, it will create an empty folder, and automatically add
.replace into the empty folder so the dummy folder will properly replace the one in