I tried headphones once, but couldn't hear cars coming behind me. I also got a lot of wind noise and found that I had to turn the volume up louder than I should.
I ride with a friend that uses a bluetooth speaker. It works well, and you can hear traffic with it better than with headphones. I think it works better than headphones.
That it works for your friend doesn't mean that it is going to work for you that way. What I will suggest is that you need to be sure that where you ride is a bit safe for riders and not a situation where you get to get into the car lane to avoid some reckless drivers hitting you from the back.