Speakers in apple devices are tuned in such a way that the full volume is not the actual full volume of the component to the best if my knowledge.
But this was also discussed in mac rumors and one reply caught my eye and is quoted; “ As you’re probably aware, songs vary in recorded volume, which is why there are features such as Sound Check. Sometimes, a song can have a very high recorded or artificially increased base volume. When you increase the volume on these already loud(er) songs, the max volume your device tries to achieve may be beyond the speaker‘s capability. When this occurs — I’ll spare you the nerdy details — the sound will be distorted and the speaker sustains permanent damage, how much depends on how far and long the speaker is pushed beyond its limits. Eventually, if damage is compounded, the sound will be continuously distorted because certain components can no longer perform their function”
So maybe limiting volume to 90 percent can help the long way. Sometimes, it happens. My lightning earpods got damaged on left side but the 3.5mm earpods of 7 years is still perfect.
And to the question, this is not your fault. If you had warranty, it could be replaced. Apple charges a hefty fee for replacement.