This feature is hidden under the feature tags. To enable it, go to settings, scroll down to the end and open system settings. Then open "Developer Options" and go to the "Debugging" section.
Scroll down in this section and look for the Feature Flags option.
Find the screen record tag here and switch it to enable it.
Once enabled, you can use the inbuilt screen recorder to record the screen …..