This wikiHow teaches you how to block a website on a Mac. While there isn't a built-in way to block your own access to a certain website, you can download an app called SelfControl or Cold Turkey to block sites for a set amount of time....
Method 2 of 3:
Using Cold Turkey

Go to https://getcoldturkey.com in a web browser. You can use any web browser on your Mac.

Click Download Now. It's the green button in the middle of the webpage.
Click Download for macOS. It's the grey button in the box labeled "Basic". This is the free version of Cold Turkey. The free version allows you to block websites on Safari, Chrome, and Firefox for a set period of time.
Click on the "Cold_Turkey_Mac_Installer.pkg" file. This file can be found in your Downloads folder, or at the bottom of Safari or Chrome when you download the file.
Follow the instructions to install Cold Turkey. Once you click on the install file, follow the on-screen instruction to install Cold Turkey:
Click the Spotlight
and type in "Cold Turkey". The spotlight search is in the upper-right corner of the menu bar. Once you type in the app name, a list of matching searches should show up below the search bar.
Click Cold Turkey Blocker.app. This opens the Cold Turkey Blocker app.
Click Install next to the web browsers you use. This opens the Extension install page in the web browser. The Cold Turkey extension is available for Safari, Chrome, and Firefox.
Open your web browser. You will need to install the extension and enable it on your web browser. When you open your web browser, the install page should already be open.

Click Install in the web browser. This displays a pop-up asking if you want to add the extension to your web browser.
Add the extension to your web browser. The way this is done is slightly different from one web browser to the next. Use the following steps to add the Cold Turkey extension to your web browser.
Enable the extension in your web browser. The extension must be enabled in your web browser. If it is not enabled, Cold Turkey will shut down your web browser within 30 seconds. Use the following steps to check to see if Cold Turkey is enabled on your web browser.
Open the Cold Turkey app again. If should be in the Dock at the bottom of the screen. If it's not already open, you can search for the app using the Spotlight Search icon, or click on it in your Applications folder in the Finder.
Click Edit block lists. It's the green button at the bottom of the "Dashboard" page.
Click + Add a new block list. This creates a new list of blocked sites.
Type a name for the list. Use the bar at the top labeled "New Block List" to type the name of your block list.
Type a web address at the top of the list and press Return. Use the bar that says "Type URL, then press the return key" to enter a website you want to block. For example, if you want to block Facebook, you would type www.facebook.com. Add as many websites as you want.
Click Save. When you are finished entering all the websites you want to block, click Save to save the list.
Click the Timers option. It's below an icon that resembles a clock in the menu to the left.

Click the calendar icon next to a block list name. The Timers screen displays all block lists you have created. Click the icon that resembles a calendar next to the block list you want to use.
Click the day, hour, and minute you want the timer to end. You can set the timer for as many days as you want.
Click the toggle switch to activate the timer. It's on the left side across from the list name. This displays a confirmation pop-up.
Click Yes. This confirms that you want to set a timer and blocks the websites in the block list for the set amount of time.Update 24 March 2020
ncG1vNJzZmismaXArq3KnmWcp51ktbDDjK2mZpqcpLCsecBmrp6ao57BpnnOp2SmmZM%3D