This is because the app which you trying to record on your iPhone may have disabled the recording or capturing permissions for privacy reasons. This is common when you try to record screen of banking apps, OTT Video Streaming apps like NetFlix, Amazon Prime, Hulu, Disney etc.