If you need an unlocked phone immediately, the unlocked one. If you need every last bit or storage, the unlocked one.
Otherwise, the carrier will unlock it after it's paid for, and rooting it will allow you to get rid of carrier bloat and - with some carriers - that's the only way to get WiFi calling and picture calling. (Which will probably change in years to come, the way intercarrier MMS sis, but not this year or next year).
Also, the factory unlocked variant is more expensive. (The basic phone, though, is the same. Unlocked doesn't gain you anything except no carrier bloat [although there's still Samsung bloat] and the ability to use any carrier's SIM card.)