Shimano shifters are very reliable, but have one common issue that’s a very easy fix, one I’d try after the obvious stuff like Coatsey says, but before replacing the cable….
The grease can get old and go hard. This gives symptoms like you describe. To fix it, pop out the cable installation grommet and flush the shifter out with a solvent of some sort – Brake cleaner and/or GT85 is best. Literally poke the aerosol straw in there and give it a VERY BIG squirt until there’s fluid flowing out of the bottom of the shifter, then repeatedly actuate the shifter. In bad cases it an take 5,6,7,8 attempts to free everything up, and I have had to open them up and play around with the pawls inside once or twice too, just flicking them with a pick until they free up.
I reckon 19 out of 20 ‘broken’ Shimano shifters can be ‘fixed’ like that
Give it a shot before you do the cable, but if the shifting action isn’t nice and light you’ll need a new cable too. That’s inners AND outers. It’s pointless not doing both most of the time