The Black Panther film is mainly about T'Challa deciding what kind of King he is going to be.
'It's hard for a good man to be a king.'
In a way T'Challa agrees with Erik but he doesn't think he is going about it the right way.
Throughout the movie we can visibly see T'Challa disagrees with the ways of the past Kings because he argues with his father in his second vision saying
"You were wrong we shouldn't have left him"
I personally feel like Killmonger comes off as a Malcolm X kind of person whereas T'Challa is more MLK. Killmonger wants to liberate his people being oppressed all over the world but through destruction and power. Whereas T'Challa feels (at the start) Wakanda shouldn't get involved.
I believe that Eriks viewpoints made T'Challa change his mind about sharing resources and helping others. This is why in the credits he decided that Wakanda should share resources.
During the film T'Challa learns this lesson:
“The wise build bridges while the foolish build barriers.”
T'Challa realises to progress he must "build bridges" with the rest of the world instead of isolating themselves.
Another reason he might have done this is because of M'Baku and the Jabari tribe. They isolated themselves from the rest of Wakanda but when in times of need T'Challa realized it the Jabari tribe who came to his rescue and not any of the other more progressed tribes like for example the river tribe.
Another reason might be that when M'Baku said:
"No King has been up here in centuries, why should we help you?"
T'Challa realises by helping others he can help himself. T'Challa does this to form friendships and strong alliances with the rest of the world no matter how technologically inferior they are.
According to Time:
In the first post-credits scene, T’Challa stands before the United Nations. He promises that Wakanda, formerly a isolationist nation, will share its knowledge and resources with the rest of the world: “The wise build bridges while the foolish build barriers.”
The speech is a blatant rebuke of the Trump administration’s immigration policies, a continuation of the film’s overtly political themes. (Black Panther isn’t even the first superhero movie to tackle immigration. Last year’s X-Men movie Logan took umbrage at the persecution of immigrants.) Avengers: Infinity War probably won’t be as political as Black Panther, but there’s a chance that T’Challa’s new philosophy plays a role in his decision to join his fellow superheroes in stopping Thanos.
T’Challa’s announcement is great news for any city that wants to build a more efficient subway system like the one in Wakanda. But sharing Vibranium, Wakanda’s most precious resource and the metal found in both Black Panther’s suit and Captain America’s shield, is risky. Vibranium weapons could be more effective against Thanos. But if the metal falls into the wrong hands (say, Loki’s) that could mean disaster for our heroes.
According to Vox:
Throughout Black Panther, we’re reminded in various ways that most people believe Wakanda to be a poor, third-world nation. But the reality is that it’s the most technologically advanced country on Earth, with all kinds of weaponry, science, and tech that far surpass what other countries have.
T’Challa promising to reveal Wakanda’s unrivaled capabilities and power seems to put Wakanda in an extremely important position going into Avengers: Infinity War. The idea is that, when Thanos shows up to wreak havoc on Earth, the fate of the planet will ultimately depend on the efforts of its mightiest country: Wakanda.