Put home assistant on a raspberry pi, plug a Zigbee dongle to it, and start connecting smart gadgets to it. Or better yet buy a home assistant Green. You can check the home assistant docs to see if a smart device requires cloud connectivity to work — in general if it connects through Zigbee (or ZWave or Matter) then you’re good, but if it connects through WiFi then it probably is cloud based.
https://www.home-assistant.io/
https://www.seeedstudio.com/Home-Assistant-Green-p-5792.html