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.