There's a very good reason my cameras stay internal only and are blocked 100% from the internet. I can access them via the NVR with a Wireguard tunnel when I'm away from home if need be.
Thing is, Ubiquiti cameras aren't cloud based. At least not to the same extent. The authentication system is cloud based, but the controller and storage is local.
You can pay for several years of a cloud subscription for the cost of either a NAS or a Ubiquity storage server.
Reolink has always been a good choice. Very good hardware for the price and they support onvif on most devices, which you can then use however you like.
Reolink, Ubiquiti, Dahua, Amcrest, and Wyze. Nice thing about a third-party NVR is you can mix and match whatever is cheapest or best for a given spot. I'm currently using iSpy Agent for the NVR as it's runs nicely in docker. Then I layer Codeproject.AI over top for person detection rather than just generic motion alerts. I'm using a 2090 Ti GPU (which is WAY overkill but I got it for free) to make the AI detection very fast.
If you want cheap and good cameras: Some Annke cameras like the C800 are rebranded Hikvision models. Add a NVR like Frigate and you have a cheap and powerful local surveillance system.