Give Screen Recording permissions to your browser
On your Mac, choose Apple menu > System Preferences, click Security & Privacy , then click Privacy.
Select Screen Recording.
Make sure the tickbox next to the browser you're using (e.g. Chrome or Safari) is ticked
For more information, please refer to the official Apple guide here.