What you linked to is a set of two valves - a fill valve and a flap valve. You can buy each separately, and of course there are other brands of slightly different designs. But my main point is, you don't need to replace the entire thing. However, you do need to select and install a valve in each location that can be disassembled so that you can replace the most common part that wears out.
First, the large fill valve. By FAR the most common problem with these is that a little rubber disk inside the top part wears out. At first, sometimes you can get it to work again simply by changing the setting of the float that senses the water level. The valve should stop filling the tank when the level is BELOW the top of the overflow tube about 1". But once the inner disk wears out you can't solve that way - you have to take apart the top assembly and remove the rubber disk (often mounted in a little plastic plunger shaft) and replace it with a new one. (In some cases, if you're lucky you can take out the disk, turn it over and put it back in the plunger. The new surface will work just fine for a few more years.) By the way, it is NORMAL when you replace the rubber disk that the new one will deform itself to fit the inner parts of the fill valve, and start to leak in a week or two so that the tank keeps on overflowing the central tube. THIS is really when you can fix that by re-adjusting the float setting to make it shut off at a lower tank level.
If there's no clear simple way to take apart the top of your fill valve, you can buy a different design and install it. Maybe buy a spare disk / plunger part in the store at the same time. Then NEXT time you can make this simpler repair. I'm more accustomed to the older valve design with a brass rod and float stuck out the side to sens tank level.
Now, the small flap valve. It's the one that the handle lifts to let water flow from the tank to the bowl. The one shown has a collar that slides down over the overflow tube, and a holder that supports the red rubber valve seal. When this valve fails, the problem is that the tank will fill and then stop filling normally, but then water will leak past this valve slowly, lowering the tank level until the fill valve opens up briefly to refill the tank. The most common cause is that the runner flap part becomes dirty or stiff. You can buy replacement flaps only for most such valves. If you can't get one for your flap valve, buy a different design that has a flap easy to replace, and a spare flap. The other possibility - less common, but it does happen eventually - is that the hard circular base of the flap valve - that is, the edge of the hole down to the bowl - erodes and becomes so uneven that the rubber flap can't seal against it. That is when you have to replace the part UNDER the flap.