I put together a cheap water meter for my yard irrigation system that works well. Since then I’ve purchased a second sensor to do the same thing for the whole house but haven’t installed it yet.
The ‘meter’ is just a hall effect pulse flow sensor, and the sensor is an ESP32 module that counts the pulses and sends it to HA. This was my first experience with ESP32 and ESPHome, so I think anyone could do it. You do need to cut the main water line and install the sensor, and you need to power the ESP32 at that location. I plan on using PEX pipe and connectors, which makes any plumbing job simple enough for a non professional, and that will allow it to be easily removed or changed out if the sensor ever fails.
This was the thread that got me started: ESPHome Water sensor
I started off with this sensor/meter package H2OPro and ended up switching out their meter with the ESP32 module.
You can get the flow sensors for under $10, and I bought 4 ESP32 modules for $25. Once calibrated it was very accurate. I set up some Utility Meter Helpers in HA to keep track of the irrigation water used daily, weekly, monthly and yearly.