This issue typically happens when there is a firewall blocking Roon or RAATServer from operating properly, or the two computers are on different networks/subnets. Do you by any chance have any antivirus or firewall-blocking tools on either Mac? For example - McAFee, Little Snitch, Bullguard, PiHole?
Can you please provide your full network setup details? Be sure to include any routers, range extenders, etc and how both PCs are connected to the network (WiFi or Ethernet).