Ok, that is more important information. It also looks like the chain is a bit long and / or the B-tension screw is not set correctly (though it is hard to tell from seeing only the rear wheel). Though if it worked like this - leave it alone!
The dérailleur moves freely (you tested it), the cable seems stuck. I
guess (hard to tell without having the bike here) that the cable is badly frayed or kinked at some place and stuck. I guess you need new cable and housing.
Remove the cable from all housing, but leave it in the shifter for a moment. Does the shifter now release / pull the cable as it should (all gear clicks)? Did you see any damage to the cable? That should give you a good idea of where stuff goes wrong.
Click the rear shifter to release as much cable as possible. Remove the cable from the shifter and replace. I had a cable break inside the shifter - not much fun to pick out the small strands and bits and pry out the end of the cable (the Shimano road STIs are difficult to take apart and put together again - so I didn't).
Look at the repair videos here on the website to see how to correctly set up the rear dérailleur (RD). The way I do it: Check the RD can reach the full width of the rear sprockets (without the cable). Make sure the barrell adjuster of the RD (and the shifter) have a bit room in either direction (screw them in all the way, and out maybe 2 turns). Put the chain on the 4th smallest sprocket. Pull the RD cable taut and clamp. Turn cranks, the chain should sit on the smallest sprocket (adjust the lower limit screw). slowly shift up. When the chain refuses to climb, turn the barrel adjuster out a bit. Shift to smaller sprockets. Repeat until it works over the full range.
Cables and housing are not a major cost (at least the normal stuff) - even if you go to the LBS (local bike shop).
I admit I bought it bulk (100 cables, 30m housing), I have too many bikes to fix
![Wink Wink](https://forums.bikeride.com/images/smilies/wink.png)
(though it is not really that efficient, cost wise... but quite convenient and looks cool in the basement, and will last me until the end of days, I guess).