In a straight comparison, I'd plump for the Yamaha. It is the more complete package since it includes the subwoofer. It has better connectivity too.
The ace up the Yamaha's sleeve is the direct/reflecting sound technology that means it can do surround without the cost and complexity of additional rear speakers. This means it can do what the Samsung does, which is to be a 3 channel sound bar, or you can switch it to full surround where it bounces rear surround off the walls in your home in a similar way to how ATMOS up-firing speakers work.
I have to say though that the surround facility isn't for everyone. It's dependent on the room layout. That said, it still has the edge over the Samsung even in 3 channel mode.
The Samsung would better suit people who value the gimmicks such as the wireless TV* connection and Amazon Alexa integration. The connectivity isn't as good, and I'm not convinced by Samsung's own in-house DSP effects. To match the sound capabilities of the Yamaha means adding the £180 rear speakers and the subwoofer at £400 or £600 depending whether you buy as a package or upgrade later.
The sub really is the star of the show. If you were considering the sound bar + sub package at £900 compared to the Yamaha at £649, then it would be a bit of a tougher call. Sonically, the sub makes a big difference to the sound, but it's still a hefty price tag.
FWIW, I think Samsung are benefiting tremendously from their ownership of US company Harmon Kardon which has a reputation for sound research. These newer Samsung sound bars are a result of the R&D work done by HK. They're a definite step up from Samsung's own Korean designs.
* Only applicable to specific compatible Samsung TVs