Rosalina wasn't even involved in the majoirty of the action of the game. It was mostly just Mario going through the galaxies, fighting Bowser and Bowser Jr. her story was just icing on the cake.
No, she was much more involved than that:
-Guided Mario throughout the game. Think of her as a commander, and Mario a soldier.
-Gave Mario the spin ability by letting a Luma accompany him, which was vital for him to actually make any progress.
-Bowser's plans revolved around Power Stars that belonged to Rosalina, and fueled the Comet Observatory. As a result, the home of Rosalina and many Lumas was left in a non-functioning state because of him. She had much more stake in things than Mario did (his girlfriend was missing, nothing more).
-She alone blasts through Bowser's fleet using her Comet Observatory's "Comet" state.
-She's responsible for overseeing the universe reboot at the end of the game.
-She talks about a number of things in relation to herself and the Lumas over the course of the game (such as explaining that she has lived for centuries).
-She had an entire back story segment in the game.
-The true ending of the game (120 Star Ending) involves only her. Mario, Luigi, Bowser, Peach, the Toads...they are not anywhere to be seen. In said ending, she breaks the fourth wall and personally thanks the player (which implies that Mario himself is an irrelevant presence in the game's plot - since you can play through the same story as Luigi, and she is thanking the player for helping her, not the characters. It implies that the player's presence is much more important than Mario's).
She's the only character in the entire game with any sort of agency, and the plot revolves around her, not Mario. Mario is, by comparison, an extra in the plot. His only interest is to save Peach. Helping/listening to Rosalina just so happens to be the only way he can do that. Though this role can be switched out for Luigi anyway (yes, you have to beat the game as Mario first, but it's the same plot either way, with the only change being that a second Luigi exists). Rosalina's role, however, is the bulk of the game's plot elements, and is not replaceable. She is the main character of the game.