Which camera do you have, the older, no-longer-sold wired Google Nest Outdoor Camera (which works in the Google Nest app) or the newer Google Nest Camera (Battery) (which works in the Google Home app? The latter can run on battery power or can be plugged in with the optional power cable; if it is running on battery power, it is usually in "Idle" mode unless it wakes up to detect activity, but it should still be online. (We have had a battery camera for 15 months; it is plugged in and is "Live" all the time.)
Unless your camera is defective, the most common reason for a camera going offline is a weak Wi-Fi signal at the camera's location. (Wi-Fi bandwidth could be another.) All of our cameras and doorbells stay online and are within 5-15 feet of a wired Wi-Fi access point except one, and in that case we bought a high-gain directional Wi-Fi antenna to ensure adequate Wi-Fi signal strength.