Thanks for your question! To learn Ganondorf's Side-B, you'll need to spend some time in training mode and practice. Start by analyzing Ganondorf's Side-B move and its properties, like range, speed, startup and ending lag. Knowing the basics of the move and its range is key to using it effectively.
Once you know the move, practice using it in actual matches. This is where things will get more difficult. You'll need to practice timing the move when you get an opening on your opponent, and also practice understanding your opponent's options and how to punish them. Getting the timing down will make Ganondorf's Side-B a very effective tool for punishing mistakes your opponent may make.
In addition to practice with the move, you may want to look into streamers and videos of pro players using Ganondorf's Side-B. Watching and learning from these players can give you a better understanding of the move and how they use it in various situations.
I hope this helps - best of luck with your training!