Of course I'll help, we have all had to start somewhere 🙂
1)Your best option would be HDMI cable from PS4 into sound bar, this way you can hear all the audio codecs your bar can decode and LPCM, the bar passes on 4k HDR video onto your Tv.
2)Next best option is optical cable from PS4 into sound bar, Hdmi cable from PS4 straight into the Tv, this option will only allow Dolby Digital and DTS 5.1 sound, PCM 2.0 sound.
3)Last option would be, to have the PS4 plugged straight to the Tv and use the arc connection for sound to the bar, this option may not allow surround sound passthrough !!
Brief description of the science of sound.
The Human ear only hears analogue sound which can be captured on magnetic tapes or records and, takes alot of storage space, to solve this, analogue sound is converted to Digital sound which compose of 0's and 1's, these then can be stored on discs and other storage means. Digital sound takes up less space than analogue.
Digital sound can then be compressed to make the file size even smaller, this is where Dolby Digital or DTS comes into effect, these are known as audio codecs, the difference between the two are they are compressed in a different way to one another then, reopened in a different way so they can go through a digital to analogue converter (DAC) so, the Human ear can hear the actual sound. As for which is best, this is down to personnel preference, try both, you may not hear a difference, then again, you may favour one above the other.
Pulse Code Modulation (PCM) is uncompressed, digital stereo sound.
Linear Pulse Code Modulation (LPCM) is uncompressed digital surround sound.
Take an A4 size of paper with writing on, now compress this into a tight ball, carefully reopen this and read the writing on the paper, there are some words that may not be readable due to creases on the paper because it has been compressed (Dolby Digital or DTS).
PCM/LPCM would be the same has reading the A4 paper before it got screwed into a ball due to these digital sounds not being compressed.
Any how, hopes this helps you out.
All the best.