I would like to prevent YouTube from accessing mobile data at all. However, I cannot see how this is done in Android 7 Nougat on my Samsung Galaxy S7.
Has this feature been removed and replaced by the option to turn it off for background usage?
You can download a firewall app and restrict YouTube to WiFi only.
For example, with Onavo Protect, from Facebook, it will establish a VPN connection that works like the firewall on non-rooted Android devices. You can restrict any app from using mobile data.