Can't connect multiple times to my computer

I have one Mac running Ventura 13.0.1 and I have it set so the display never shuts off, only the screen saver comes on. I can connect to it via Teamviewer once whether it has been an hour or a week since I left it running, but after I connect once and then disconnect, I can't ever connect again. I come back to the computer and the screen saver is still running, so it hasn't shut down, but the computer I am trying to connect from always says that the computer I'm trying to connect to is not connected to the internet.

What is the correct way I should be disconnected? I am using the X in the menu bar in the bottom right of the screen on my computer (I'm not disconnecting using the interface of the computer I am on, not connecting in the computer I am connecting to) or what setting should I use to be able to reconnect over and over again? Thank you for any help!