Macs automatically remember all the Wi-Fi networks you've ever connected to with your passwords. If you're having trouble connecting to Wi-Fi, you can remove one of the network lists to address your issue.
If there is a network you previously connected to and it no longer works, delete and connection again is a good way to try to deal with any problem. Either you want to remove a "lean network" or you want to delete a Wi-Fi network stored in MacOS and has been there for years, you can do it from the Network preferences of the Mac network.
First, open System Preferences. To do this, click on the "Apple" icon at the top left of the menu bar and select "System Preferences".
From the "System Preferences" menu, click on "Network".
Make sure you select "Wi-Fi" on the left side of the window and click the "Advanced" button at the bottom of the window to see more choices.
Click the network you want to delete to highlight it. If you want to delete multiple networks, Command + Click on each one. Click the "-" button to delete the networks.
Click "Remove" in the pop-up window to remove the networks. If you chose more than one, you can select “Apply To All” to avoid seeing this pop-up repeatedly.
If you want to avoid storing Wi-Fi networks in the future, you can deselect frame next to “Remember Networks This Computer Has Joined”.
When done, click the "OK" button in the lower right.
Finally, click the "Apply" button to apply the changes.
Source of information: howtogeek.com