Toilets are designed to last for a long time, but parts within them may need to be replaced before the entire toilet is at the end of its lifespan. Some of these parts replacements are quick and easy to do. Replacing a toilet fill valve is one of those parts that are simple to replace.
The toilet fill valve opens and closes as you flush the toilet to allow water into the tank. It is usually located on the left side of the tank. The fill valve is part of the flush valve assembly, which will eventually need to be replaced too but not necessarily at the same time as the fill valve.