to my knowledge, thunder isnt the sound of lightning breaking the sound barrier.
Lightning is literally just a bigger version of an electric spark, electric sparks make sounds too.
Copy pasting google answers is probably wiser but i want to know if my knowledge is correct or not based on whether people will correct me on this.
EDIT: i just googled, it's basically just air vibrations by result of lightning, though i don't know the difference between air vibration and it breaking the sound barrier. It even compared it to a whip cracking but i know whip cracks because it breaks the sound barrier.