OK, let’s start again, with the bike in a stand if possible:
Shift the shifter into the smallest sprocket.
Disconnect the cable at the mech.
Wind the shifter barrel adjuster all the way in, then two turns out.
Wind the mech H limit screw out until the upper jockey wheel is slightly outboard of the smallest sprocket, then whilst turning the cranks forward, wind it in until centred on the smallest sprocket and the chain runs smoothly.
Re-connect the cable at the mech, and whilst turning the cranks forward, shift into the second smallest sprocket.
If it doesn’t shift cleanly and correctly, increase the cable tension (wind out the barrel adjuster) until it does.
Go up and down the block, but only as far as the second largest sprocket, checking the shifting is ok.
Finally, set the L limit screw by shifting to the largest sprocket and keeping the shifter pushed all the way in – the limit screw should allow the top jockey wheel to go just inboard of the largest sprocket when the shifter is all the way in, but not enough to derail the chain – this means that when the shifter is released, the mech is not sitting against the limit screw (unlike at the other end).
Cable tension at the barrel adjuster should be increased if the shifting is sluggish from smaller to larger, and vice-versa. Only adjust a quarter of a turn at a time.
On the smallest sprocket, the cable has virtually no tension so the mech position is determined by the H limit screw. At the largest sprocket, the cable is at full tension and holds the mech in position – the L limit screw is there to prevent over-shifting into the spokes.
That’s the method I follow every time, and it takes a grand total of about five minutes to set up perfectly (assuming nothing is bent, cables are running free, etc)!