I saw a ribbon on PKHeX called Legend. I don’t know how to get it in game, or why you get it or what title it gives a Pokémon.
The Legend Ribbon is a Ribbon from HeartGold/SoulSilver that is obtained after defeating Red at Mt. Silver. Equipping it in Sword/Shield will say your Pokémon is "the Living Legend".