macOS Mojave and later released a security setting that requires you to grant the operating system camera and microphone permissions, under System Preferences.
IMPORTANT: You must grant each browser camera/mic access.
Give camera and mic access
Go to System Preferences > Security & Privacy > Camera.
Click the box next to the browser you're using. It'll quit and reopen your browser.
Do the same for Systems Preferences > Privacy > Microphone.