Cap clearly got amped. How do we know this? Because he was able to use lightning attacks.
The hammer doesn’t have lightning powers. Thor has lightning powers.
Also he didn’t get splatted when Thanos struck him, so it clearly seems his durability got boosted while wielding said hammer.