To perform screen recording on macOS you have to grant your browser to record the content of your screen.
- Open System Preferences
- Select Security & Privacy
- Change to the Privacy tab
- Search for Screen Recording in the list
- Allow your browser to record you screen
