Q&D "divide and conquer" approach. If you can reproduce the problem at will, as it's happening, pull downward (toward the der) on the cable along the downtube.
If it still doesn't grab the next cog, then I would look "downstream" for the problem -- derailleur, lower section of cable housing at the der, poss. even the guide underneath the BB shell.
If it DOES shift with that tug, that suggests the problem is "upstream" -- top section of cable housing, shifter, etc.
That should at least narrow the range of possible culprits.