The model of your TV would help.
If the TV has optical out then you need a toslink optical cable.
If the TV has coax digital out then you need a coax to optical converter.
If the TV has analog audio or headphone out you will need an Analog to Digital converter.
If it doesn't have any audio outputs you can connect all you sources to an HDMI switch that has an audio extractor to provide optical audio.
This won't give you audio from the TV tuner or smart functions which are internal to the TV.