You can easily block a website on Firefox — but you'll need to download the Block Site extension first.
You can block individual sites, or only allow your Mac to access certain sites, via Screen Time.
This guide explains how to block and filter websites to restrict employee access to certain content on the company network.