If sound quality for music is your top priority, lean towards the Sony WH-1000XM5. Its LDAC codec support gives it an edge when playing high-resolution audio files, assuming your source device also supports LDAC. The Bose QC Ultra is no slouch, but the XM5 delivers a slightly wider soundstage and more detailed sound profile. For calls, the Bose has a slight advantage in noise rejection, but the XM5 is more than adequate. Both are comfortable, but fit is subjective, so try them on if you can. Battery life is similar enough to not be a deciding factor.
techfan101: LDAC support on the Sony is the key difference if you care about high-fidelity streaming; otherwise, the Bose is a solid all-arounder, especially for calls.