Which one to buy
For a few PoE cameras or access points in a closet, the fanless Switch Lite 8 PoE with its four PoE+ ports and 52W budget is the one I'd start with.
The Flex 2.5G 5 is for adding multi-gig ports near a NAS or an AP; it takes PoE in but doesn't put PoE out, so it won't power anything downstream.
The Pro Max 24 PoE is the rack switch with 2.5GbE PoE++ ports, 10G SFP+ uplinks and a ~400W budget for a whole house of cameras, and all of them need a UniFi OS controller for the Home Assistant integration to read them.
The 16 PoE (150W) and the Switch 24 Gen1 are discontinued; both still work in current UniFi Network, but you'd be buying used or refurbished.
I haven't run any of these; the picks are based on the spec sheets and what other Home Assistant users report.