Hi @Annie_Simmons welcome to Zwift forums.
The smartphone running the Companion App and the computer running the Zwift game app have to be on the same WiFi network to see each other. The sort of issue you’re describing can happen if your WiFi signal is flaky
There are some other helpful ways to improve issues with Zwift Companion on our support hub.