I haven’t played much, but basically, little girl wants to catch Rayquaza because she saw it once before while in hyperspace, and no one believes her. So, she goes to the protagonist to ask for help making the best donuts to feed Hoopa, which Hoopa uses as energy to enter the dimensions. Later, the goth “evil” guy I don’t recall the name of is like “so actually it’s going to swallow Luminous so you need to investigate and save us again” and then also, rampant mega Pokemon.
I’m only at the beginning so I’m not sure the rest. I have no idea why the little girl is alone or with Hoopa. Apparently she sneaks away and returns home off-screen.