Broken headphones
I purchased a iPhone 7 recently and the headphones that come with the phone have broken, I am still under warranty
If the problem is a manufacturing defect return them for replacement under warranty. On the other hand if there is accidental damage, that would not be covered by warranty unless you purchased such coverage.
Broken headphones