If NetworkManager is connecting to the wrong default wireless access point (AP) on your Linux system running GNOME, there are a few steps you can try to resolve the issue:
Make sure that the AP you want to connect to is in range and is broadcasting its SSID (network name).
Check the NetworkManager connection settings to ensure that the correct AP is set as the default connection. To do this, open the NetworkManager applet in the top bar and click on the "Edit Connections" option.
In the "Edit Connections" window, select the wireless connection that is connecting to the wrong AP and click the "Edit" button.
In the "Wireless" tab, ensure that the correct AP is set as the "SSID" and that the "Connect Automatically" option is enabled.
Click the "Save" button to save the changes.
If the issue persists, you can try deleting the connection for the incorrect AP and creating a new connection for the correct AP. To do this, select the incorrect connection in the "Edit Connections" window and click the "Delete" button. Then, click the "Add" button to create a new connection for the correct AP.
You can also try resetting the NetworkManager configuration by running the following command in a terminal:
sudo nmcli connection delete id '*'
This will delete all of the NetworkManager connections and allow you to set up new connections.
If the issue still persists after trying these steps, it could be caused by a problem with the wireless hardware or driver. In this case, you may need to try updating the driver or troubleshooting the hardware.