This error happens when the app does not have the right permissions. You should go to your device settings.
Find
YouTube in the list of apps. Make sure all the needed permissions are allowed.