Check out this post for a guide about Where to get Riolu / Lucario in Pokemon Sword and Shield.
Riolu and its evolution Lucario are quite a popular Pokemon that many people look for, and they are available in both Pokemon Sword and Pokemon Shield version!
Information/Guide on How to get Riolu / Lucario:
You can only encounter Riolu / Lucario in the grass field of Giant’s Cap area during snowstorm weather.
The chance of Riolu appearing is only five-percent. You can also encounter Lucaria, but the chance is very slim.
If you can’t wait for the snowstorm weather on Giant’s Cap area, you can try changing your Nintendo Switch system date to February 1st, 2020 or February 2nd, 2020
Another way of getting Lucario is by evolving Riolu. To evolve it, you need to have max happiness and level it up at day time.
And that’s all for the guide. Good Luck getting Riolu / Lucario, and have fun playing the game!