Hi Jakubb11,
We're glad you've reached out through Apple Support Communities for help using AirPlay from your MacBook Pro. We're glad to help in any way we can!
So that we're on the same page, let us know which exact model of MacBook Pro is experiencing this issue. Also, what's the version of macOS installed? Both of these bits of information can be found under Apple menu () > About this Mac.
You'll want to confirm that your device meets the minimum system requirements for AirPlay listed in this guide:
AirPlay system requirements
If your Mac meets the requirements and is still unable to AirPlay, you'll want to refer to the troubleshooting steps in this guide:
If AirPlay or screen mirroring isn’t working on your device
Let us know if this helps, or if you've got any questions!
Have a great day.