Start from first principles. Assuming you have fitted like for like. Undo the derailleur cable.
Adjust the outer (H) limit screw until the chain just drops from the second smallest cog to the smallest.
Adjust the inner (L) limit screw until the chain climbs from the 2nd largest cog to the largest.
Bottom the cable adjuster on the derailleur and shifter. All the way in and out again 2 turns.
Manually tension the cable and ensure the shifter has its full range of movement in both pull and release. Ensure the cable does not snag, is not frayed or kinked. Pay careful attention to the section under the BB if that is the routing.
Manually tension the cable and fit it correctly to the pinch bolt. There is a groove in the derailleur body and the clamp. Just in case the clamp is 180o out, the groove in the body is the correct orientation. Don't worry at this stage about cable tension. Turn the pedals and change down until you run out of clicks. Ignore the indexing, what you're doing is seating the outer cable as it will have relaxed slightly when you took the tension off.
Change up all the way to top, ensuring the chain ends up on the smallest cog under its own steam, adjust limit if necessary. Undo the clamp and pull any slack from the cable manually. Retighten the clamp.
Turn the pedals and click the shifter once. If it changes to the next cog smoothly continue across the cassette. If not add a half turn to the adjuster until it does.
CAVEAT. If your mech is new and your chain/cassette worn it may only be possible to adjust downshifting (pulling the cable) reliably. A worn chain can 'hang' on the cog needing two clicks to get to the next.
HTH