Android Debloat Script Generator
This tool will generate a script to debloat your phone based on the output of the PM command.
The resulting script will probably require root. I did this on a Sony Xperia XZ1 compact without unlocking the bootloader, so any temporary root will do the trick.
Prerequisites
Tool
adb shell pm list packages -f
and paste the output into the text are below.