If AirPlay is working consistently across devices for at least one external service, then AirPlay itself is working. as such, your problem is not Airplay. I presume that, regardless of AirPlay, you cannot stream the problematic content directly to your iPad and other devices.
Has your router configuration recently been changed - or if your Router/Modem is supplied and remotely managed by your Internet Service Provider, have they recently updated the firmware? Given your additional information, suspicion shifts to the router/modem and your internet service provider.
If you have subscribed to a commercial VPN service, you might try using the VPN as a diagnostic tool. The objective here is to attempt to route streaming services past any ISP issues.
If you don’t have a VPN subscription, whilst I am normally hesitant to recommend using a “free” VPN service (as free VPNs generally rely upon advertising and traffic/data mining to finance their services), you might try using the hide.me VPN App from the App Store:
https://apps.apple.com/gb/app/hide-me-vpn/id953040671
This commercial VPN service is trustworthy - and is nominally financed by subscription. It has a generous “free” tier with which to test the service and its capabilities, although the free service is limited in the regional endpoints through which to route your connection. That said, it should be more than adequate to test many streaming services such as YouTube; Netflix and some others may be less successful. If you can, choose a regional VPN server closest to you.