It's an easy fix, I did one in our house 6-8 months ago. https://www.homedepot.ca/product/fluidmaster-400a-universal-toilet-tank-fill-valve/1000131456
The hardest part is adjusting the valve float to the correct height, mark the height of the old one. I didn't do that and we didn't have enough...