Ok I’m confused

Ok I need help understanding this. Black panther died when thanos snapped his fingers but in endgame he came back and fought with the Avengers to beat thanos. So why wasn’t he in Wankanda forever? They said in the movie before the mother died 6 had pasted since he left the year before and every thanos snapped away came back 5 years later plus he was in endgame. So I’m so confused what happened
0
Comments
It’s mass instead of class. Bring back the good stuff Santa!
Also captian Marvel is one of the most powerful character, it's a shame she only got one film and not a series