Warning: This story contains full spoilers for Avengers: Endgame!
Captain America was able to make the mighty Mjolnir budge only a bit in Avengers: Age of Ultron, but in Endgame he was able lift Thor’s hammer and use it to bring the fight and the lightning to Thanos. So what changed that let Cap finally lift the hammer?
The Rule of Mjolnir
As we saw in the first Thor movie, Odin enchanted the hammer so it may only be used by the worthy. In the comics, this rule was essentially the same, and a small selection of Marvel characters aside from Thor were able to lift it on rare occasions, including Steve Rogers, who did so twice.
Once was while Steve was operating as The Captain and he merely picked up the hammer to wallop some villains and give it back to Thor.