Expansion tanks are a typical solution to thermal expansion. There are different sizes for different applications, but all comprise a tank with a rubber diaphragm inside. The tanks come precharged with air to 40 psi, but to be effective, they need to be charged to the same pressure as the water inside the installation. So if you measure your water pressure at 60 psi, then you need to charge the tank to that, too. A tire pump will work.
The tank can be installed on any cold-water line. It’s best to position it so that it is not above the heater where hot water can rise into it by convection. Hot water will eventually degrade the rubber diaphragm.
When thermal expansion occurs, water expands into the tank and compresses the rubber diaphragm. When the pressure eases, the air-filled diaphragm pushes the water back out into the line.
What this means is that the pressure has somewhere to go instead of stressing piping, appliances and water heaters and, perhaps, forcing the water heater’s temperature/pressure relief valve to open and vent water.
At right, is a typical expansion tank in a boiler-and-storage-tank installation.