Hi miljan49,
Thanks for coming to Apple Support Communities for help today with your new MacBook Pro and a crackling speaker.
Have you tested with multiple audio sources? This could help isolate the issue if you tested with Apple Music and then YouTube for example
Seeing if the issue occurs over headphones would also help isolate.
If the issue occurs inside a new user account, then the possibility of the issue being hardware is more likely: Set up users, guests, and groups on Mac.
If that's the case you'd want to look into an exchange or service.
Have a fantastic day!