Do you have VPN (Virtual Private Network) active? If yes, please disable it.
Do you have any third party antivirus/firewall software? If yes, please make sure to add spacedesk in the exception list to allow incoming and outgoing connection.
What is your current network profile type in your primary machine? Is it private or public?
You can check this in Windows Settings -> Network & Internet -> properties of the current network.
It it’s public, please switch it to Private and check if the viewer app can now discover the primary machine.