Without model numbers we can't give you an exact answer.
You would need to add a bluetooth transmitter to the TV audio output (if it didn't have BT built in).
If the soundbar has BT then pair them.
If not you would also need a BT receiver for the soundbar.
Seems like a lot of trouble to replace a singe cable.