You want to understand that Mario’s archetype is a mix of a rushdown and hit and run type of character. Mario excels at destroying opponents with good reads and is capable of destroying zoners as well, which is Young Link’s archetype. In this case, I feel like Mario has slight advantage, but can be at a disadvantage if you can’t counter Young Links projectiles nor be able to beat his kill setups with DI.
Most of Young Links moves revolve him using projectiles to pressure opponents, which can be difficult if you play a character who does not reflect nor have a projectile himself. Young Link can easily combo projectile moves into each other that can setup kill moves to end on moves like dair and upB. Mario has a cape that can be used to send projectiles back to YL if timed correctly, although spamming it can easily be read by your opponents. It can be quite difficult to deal with since Young Link has better control when directing his projectiles, but reading these are key. Spacing in neutral is also very important, since one hit of a projectile from Young Link will help him combo you easier. Playing patiently is key to beating out zoners, since it will help you focus and read on habits that your opponents tend to do. By reading these habits, you can make them react in the way you want that’ll allow you to punish them, when they do things such as dodges or approaching with a projectile/aerial. Mario is a great character that can pressure opponents with bair and uair strings that can rack up damage quickly. One of Young Link’s weaknesses is that he lacks range with his aerials (projectiles sort of make up for this), but requires hard reads or setups in order to kill. Focusing and reacting with shield or perfect shield will help you narrow down the opportunities of Young Link to land kill moves such as fsmash and dair against you, and narrow his usage of projectiles against you. Even if Young Link can’t use his projectiles, moves such as dtilt and nair are quick moves that can be difficult to avoid since they can easily set for more combo setups. Spacing and perfect shield once again is viable against zoners, as well as mixing up your options for moves and movement to keep your opponent guessing.
Another thing is that stages can help any character avoid projectiles, even those who don’t have a projectile nor can reflect. Stages like battlefield can help you avoid projectiles by utilizing the platforms for your movement, which can be difficult for Young Link to use his projectiles against you, since it narrows down the options available to use projectiles, since bombs are the only option that allow him to hit directly above and below him. Even if they don’t use projectiles, Young Links moves are linear and can be predictable if he tries to challenge you off the platform, so reacting to his options is key to beating him.
Just note that it’ll take time to improve your matchup against Young Link, since each loss against him will help you learn more on how to approach and adapt to counter his playstyle. Playing the matchup more will help you improve, and even playing as Young Link can give you an idea of how approaches work for him. Not saying that you should 100% play as Young Link, but experimenting with him isn’t a bad idea.