Unfortunately most modern TVs don't have a 3.5mm jack for headphones anymore.
You can connect bluetooth headphones directly to the TV.
If you want to go wired you will need an audio adapter / audio extractor / converter / DAC (these things go by many names).
There are different models.
There are models that receive audio via optical (Toslink).Ideally you connect it to the optical out of your TV to have sound for all sources (make sure to set audio output to PCM!)
Here's an example:
NOTE: the examples I found by doing a very quick search on amazonThere are a lot of different models with different build quailty and mayber other features.So check for yourself!
https://www.amazon.com/Digital-Converter-Coaxial-Optical-Convert/dp/B07XC42GZR
And there ones that can get the audio via the HDMI eARC port, like a soundbar does.These are usually more expensive.
https://www.amazon.com/Extractor-Adapter-Soundbar-Speaker-Amplifier/dp/B09NDB7R7H