Think of this as one of the many ways you apply ReVanced patches on the official YouTube apk. ReVanced Manager being the popular one for non-tech savvy users.
I just tried this yesterday on termux with the ReX patches. I did something wrong and it failed.
I was planning to use this over the Manager to export apks with different package names. As the Manager, by default, does not allow it. Or maybe I'm wrong.
Idk if it actually supports it could be but I can say it's probably easier to use something we're you can easily just configure the different names without needing to create some files in a specific folder. Also since Revancify X has been discontinued use Revancify for that now.