If your Source supports 'immersive' audio (Atmos) and your Soundbar supports Atmos and you plan to put either the TV or a Switch between the Source and the Soundbar then the intermediate device (TV or Switch) have to also be Atmos capable to allow you to send Atmos to the Soundbar.
Your TV is unlikely to support Atmos on its HDMI Inputs so Source > Switch > Soundbar > TV is likely your best connectivity which then requires a Switch which is capable of passing Atmos audio and ideally HDR video as you TV supports HDR.
Where you send a non-Atmos signal to the Soundbar you will usually have the option to 'up-mix' on the Soundbar to give you some form of overhead sound.
Joe
Your TV is unlikely to support Atmos on its HDMI Inputs so Source > Switch > Soundbar > TV is likely your best connectivity which then requires a Switch which is capable of passing Atmos audio and ideally HDR video as you TV supports HDR.
Where you send a non-Atmos signal to the Soundbar you will usually have the option to 'up-mix' on the Soundbar to give you some form of overhead sound.
Joe