Like Riolu and Eevee, you can get a Ralts very early in Pokemon Legends: Z-A if you go off the beaten path and explore Lumiose City a bit. It isn’t found in Wild Zones early on in the game. Instead, your best bet is to engage in a little parkour to reach an enclosed area not far from Wild Zone 2.
Where do I find Ralts in Pokemon Legends: Z-A?
Right where the words Vert Sector 4 appear on the Lumiose City map, in the same building area near Cafe Classe and a Pokemon Center, there is an enclosed space with some scaffolding. A Holo Elevator is also nearby. Take the Holo Elevator up to the rooftop. Run toward the interior space. Either take the Holo Elevator down or the ladder near Cafe Classe. A Ralts will be there.
Here’s the map that shows the exact spot where I found it. It was on the ground, in the green patch of grass, in the center of the red circle.

Both times I caught one there, it was at level 10. If you have a Great Ball, there’s a good chance you can capture it without a fight. (As you can see from the screenshot I included at the top of this article though, I did need to send a Pokemon out to catch one of mine.
From there, just level it up and you can get a Kirlia and then eventually either a Gardevoir or a Gallade.
Pokemon Legends: Z-A is available for the Switch and Switch 2.