Most of the hotels will offer you loyalty benefits and rewards even if you book through an OTA and they don’t differentiate.
Also booking through and OTA has its own advantage such you can read reviews, get better deals and also check the nearby properties.