Hey there LauraMagdaB,
We understand you've been unable to use the screen recording feature. You see an error about AirPlay, CarPlay, and restrictions. We'll be happy to help.
If you're using CarPlay or AirPlay you'll need to disconnect in order to use the screen record feature.
However, if you're not using either, let's check for restrictions. Go to: Settings > Screen Time > Content & Privacy Restrictions > Content Restrictions > Screen Recording
Make sure that is set to "Allow".
For full details on restrictions, check this out: Use parental controls on your child's iPhone, iPad, and iPod touch
Let us know how that goes or if you have any restrictions. Cheers!