First of all, congrats on the invitation. As a mathematician, I can only really speak to the culture in math, where it seems that being an editor for a lower ranked journal does not prevent you from being invited to become an editor for a higher ranked journal. Consider Emily Riehl's CV: she was an editor for Cahiers first, then HHA, then JHRS, then JPAA, and now the Bulletin of the AMS. The latter two are considered stronger journals than the first three. Similarly, Kathryn Hess was an editor for Algebraic and Geometric Topology and then for Publicaciones Matematiques (which, at least, has a higher impact factor).
In math, editors are chosen according to several criteria. Here are some in no particular order:
Geographic diversity. I was chosen as an editor for a journal for this reason, because there was no editor in the USA, but the journal did want submissions from the USA.
Prestige; having famous editors does tend to make the journal look fancy.
Is this person known to be well-organized, can manage lots of exchanges with lots of authors at once, generally can be trusted not to drop the ball, etc.
I'm not sure, but it's possible representational diversity plays a role, e.g., an all-male editorial board might look bad and also might drive away submissions from female authors.
I think previous successful editorial work will make it likely that other journals would think highly of you on point (3). Hence, it might increase the probability that you'll be asked to be an editor for a big shot journal.
Some people also deliberately go the other direction, and use their fame to pump up relatively new journals. For example, Mike Hill was an editor for Transactions of the AMS and for Math Z, but now is an editor for the Tunisian Journal of Mathematics and La Mathematica.
Being an editor is a lot of work. Your decision shouldn't be based on the prestige of the journal asking you to do this work (though, Buffy is right as usual, that you should not tie yourself to a known shady journal). Also, being an editor probably counts less in your favor than a strong publication record, from the point of view of getting a permanent job, tenure, and promotion. My advice is to only take on this work if you have the bandwidth to do it well (sounds like you do), and want to be part of the publication process for folks in your research area. Long-term, you can imagine using your editorial work to expand the set of publication venues for people in your research area, to help developing journals succeed, and to shape and improve the publication landscape.