I am workng on my introduction part of my speech and here is my transition sentence:

With my voice, I can make a difference in 5 different ways.

Would these be like the examples of the "5 different ways" ?

preventing people from doing a bad action, helping a friend with their work, giving advice and encouraging others.

There seem to be 4 there, but yes, the phrasing is right.

Yes, those examples can be considered as some of the "5 different ways" you mentioned in your transition sentence. They showcase different ways in which you can make a difference with your voice. However, if you want to strengthen your introduction, you may consider providing a broader range of examples or explaining each of the five ways in more detail to give your audience a better understanding of your speech's objectives.