Of course, you should build your own bridge to connect them to (rather than using the bridge of a big tech company).
For Zigbee you can use the Conbee [0] and for Z-Wave you can use the Z-Stick [1] to build your own bridge.
Furthermore, some of the cheaper WiFi devices that are based on the ESP8266 chip can be flashed with a custom firmware called Tasmota [2] to make them cloud-free.
[0]: https://www.phoscon.de/en/conbee2