In Ragnarok, it is made clear that Thor doesn’t need Mjolnir to conduct lightning (he’s not the God of hammers after all). So, in Endgame, when Cap uses it, why can he conduct lightning?
I just have to say I love the fact that "Lightning" answered the question!
I never read the comics, but I assume that that was Thor's power and wasn't connected to Mjolnir, which I believe is what Odin was telling him. So Cap is worthy to wield Mjolnir, but he has no powers (well other than his super soldier ones).