Yes, your computer Bluetooth stack absolutely needs to support the codec you wish to use on your headset.
The codec is the audio format that is transmitted "over air" from the computer and then decoded by the receiver.
Bluetooth does not have the bandwidth to transmit raw audio data, hence it requires encoding before transmission hence we use various codecs (encoder deccoder).
Historically Bluetooth "client" devices such as headsets were never expected to have any significant processing power and were never expected to be able to decode things like mp3, mp4 or so on. Instead they were given an audio codec that achieved reasonable quality with very limited processing power. SBC.
A device sending Bluetooth audio was expected to do all the decoding itself, creating essentially a raw unencoded audio stream, which it then re-encoded in the format understood by Bluetooth devices.
One problem with Windows is that most drivers for Bluetooth are made to be cheap rather than good, and so they tend to only support the "standard" bluetooth codec which is SBC. SBC is not intended to be fast, neither is it particularly high quality.
Since its creation a few more codecs have been added such as aptX, aptX HD (high definition), aptX LL (low latency, LDAC (lossless digital audio codec) and so on, all trading speed, quality and bandwidth to achieve a goal of better audio, lower latency or so on.
There is an alternative Bluetooth driver for Windows that supports LDAC but it is paid software with a trial.
DD+ (Dolby Digital Plus) claims to be built into Windows 10 and Edge but I have no way to verify that it is actually available as a Bluetooth codec that can be used to transmit data to headphones.
Phones tend to support better audio codecs by default, which the manufacturer has to pay the licence costs for, because we are far more likely to connect Bluetooth headsets to them. Bluetooth is very bandwidth limited and currently does not support high quality bi-directional audio, as in using a microphone at the same time as playing high quality audio, and in the PC space we tend to prefer dedicated wireless headsets with their own proprietary audio transmitters and receivers.
Bluetooth also has significant latency as the audio has to be encoded, transmitted and decoded. One company estimated that latency at anywhere between 30 to 200 milliseconds.
For just playing audio such as music or films Bluetooth can be fine as if you know the latency of your system you can compensate by delaying video frames, but for gaming where you require low latency high quality audio in both directions you can end up with audio being significantly delayed from what you see on screen.