@DJ Roy Bro, screen mirroring is like wireless HDMI connection. Whatever you're doing on your mobile will be on the screen via mirroring. So, only mobile internet connection will be consumed.
Casting is slightly different than screen mirroring. Casting a YouTube video on the device requires YouTube app on both the devices. You can use your mobile's YouTube app to control the playback and select videos or arrange playlist, that requires internet. The YouTube app on the device will play the video, which requires internet connection. To use casting feature, your devices should be on the same WiFi network.