Just follow this step-by-step tutorial to find out how to forget a WiFi network on your Mac.
Click the WiFi icon from the top menu bar and click on Open Network Preferences…
Or you can open the Network preferences by going to Apple menu > System Preferences > Network.
Make sure Wi-Fi is selected in the list on the left and click the Advanced… button.
From the Preferred Networks list, click on the Wi-Fi network that you want your Mac to forget and click the remove button (–).
Click Remove if you are asked to confirm.
Click OK and Apply.