Yes water should be turned off to the house if you're gonna be gone from the empty house longer than a few weeks.
You can turn the water off at the water meter using a tool you can buy or have the city or town water department come out and turn the water off for you if you plan to leave your house empty longer than a few weeks.
If you don't turn the water off to the empty house when you're gonna be gone longer than a few weeks then you may come back to a water leak and flood in your house.
I was gone a week and came back and my water heater had a pipe burst on it and it was leaking water all into the bedroom next to the water heater.
So now I always turn the water off when I'm gone even for a few days just to be safe.
If it's a water well then turn the pump off at the electric so water doesn't come into the house.