السلام عليكم ورحمة الله وبركاته Is One in the state of sinning if he goes to a gym which place vulgar music and is it sufficient if he wears headphones or any type of AirPods to block out the music and listen to beneficial stuff like Quran, etc.

Ustadh AbdulAziz al-Haqqan
If you can avoid the music and what is forbidden then in sha'a Allab it is allowed.