Thank you very much for your reply so would I get a good sound out of the TV/Soundbar using optical cable
Optical sound quality is just the same as HDMI ARC except it can't do the Atmos version of Dolby Digital. If your TV doesn't pass Atmos, or your sound bar doesn't take it, then there's no loss of features.
One important consideration though is how you control the sound level of the bar. If you use your TV remote, or Fire TV stick remote, then those Vol+ / Vol- / Mute signals are getting from the TV to the sound bar via the ARC connection. Optical can't do that. If you change to optical then the sound bar won't wake up or shut down with the TV, and you'll need to use the sound bar remote for volume all the time.
An alternative to Optical is to use a HDMI switch as a way of making one HDMI socket serve two, three or four connected devices. Switches cn be controlled by a pushbutton on the device (you get out of your chair and walk over to make the change), or via infrared remote, or via signal sensing. This last one sounds ideal, but the results can be inconsistent.
Signal sensing does what it says on the tin. When a device gets powered on then the switch senses the video signal and switches to the 'live' input. The fly in the ointment is that some devices never really switch off, or they wake up for a software update or some housekeeping routine that would normally be done in the background, but the switch misinterprets that as a cue to change the input. Sky receivers were notorious for holding auto-switches hostage. LOL
There are a couple of other things you should be aware of before you hit the buy button.
Splitters and switchers are not the same thing. Some devices sold are indeed bi-directional. They can be used as you want, but also as a splitter to send one source signal (say a console) to two or more TVs. Others are not what the advertiser suggests. Sellers quickly realised that shoppers hadn't much of a clue about signals being directional, or the difference between splitting and switching, and so they were asking for switchers when they meant splitters and vice versa. The response was simple. Just include both descriptions in the ad text even if it's not correct. Caveat emptor.
The second thing is to make sure you buy the right standard. There is stuff still around that just does 1080p HD and won't pass 4K. This is mostly the cheapest gear. That's okay for your Blu-ray player if it's a straight 1080p machine, but no good if you have 4K BD discs or you play 4K streaming content. There's stuff that will pass 4K resolution, but won't do HDR. Some sellers will refer to '4K 3840x2160@30Hz and 3D'. Tread carefully here if you watch Prime / Disney+ / Netflix Premium and the UHD HDR content from iPlayer. If the specs say it's HDCP 1.4 then that's not HDR10 / HDR10+ / Dolby Vision compatible. The same goes for HDMI standard 1.4 / 1.4b or lower.
To play HDR content the switch needs to be up to HDMI 2.0 and this should also make it HDCP2.2 standard.