In order to claim Mew, head to Floaroma Town, which is one of the first you’ll travel to on your journey. In a field filled with flowers, there is an old man and an old woman. Speak to the woman and she’ll comment that she has a Pokemon she wishes you to take care of. That Pokemon is Mew. That’s all you need to do in order to have one of the most versatile Pokemon in the whole series on your team.
Similar to Mew, Jirachi requires that players have save data associated with their account from Pokemon Sword or Pokemon Shield. In the same place that you just picked up Mew, speak to the man standing next to the woman and he’ll hand you Jirachi, a Pokemon that was once so rare, you had to buy a game on a completely different system to obtain it.
dont forget you need to have a save file of Pokemon SWSH for jirachi, and a save file of LGPE for mew.
hope I helped!