It's more likely to be the shifter itself, but wouldn't hurt to replace the cable anyway, give the shifter workings a blast with some gt85 and go through the gears, hopefully it'll help, you can give them a proper clean and regrease if so or just keep doing the same occasionally. If it doesn't help you can try stripping things back further to find the sticky bit, but it's fiddly and prone to fucking things up more.
It's more likely to be the shifter itself, but wouldn't hurt to replace the cable anyway, give the shifter workings a blast with some gt85 and go through the gears, hopefully it'll help, you can give them a proper clean and regrease if so or just keep doing the same occasionally. If it doesn't help you can try stripping things back further to find the sticky bit, but it's fiddly and prone to fucking things up more.