Riri in WF was there for two reasons: the main one is to Spiderman her. We didn't get a Spiderman intro story, he just showed up in Civil War as an established (but realtively inexperienced) hero. This was Marvel's answer to avoiding the endless origin stories we get and what they did with Riri.
We get shown she's an intelligent character, the first time we see her suit it's already built and has passed the flying test (aka like halfway through the first Iron Man). We also get some justification to make her plausible as a character. Tony Stark was a billionaire and owned his own empire, we don't blink that he has a workshop and resources. We see Riri has to scrape parts from the trash, trade favours for workshop space etc.
They put her in Wakanda Forever as an easy way to shoehorn her into a bigger stage with the detector, and to play off the cultural notes. The pace of her intro and the smashing over the head with slightly cringey Int brags was a bit of a mistep. And it would have been nice to highlight some hole in her knowledge she can overcome.