It depends. A bit of type overlap is okay, especially if the weaknesses don't overlap. For example, Gliscor and Gyarados are both Flying types, but they don't share the same weaknesses. This makes the shared typing harder to exploit. (And yes, I know Gliscor isn't in Gen 8 OU. It was an example.)
If the Pokemon fulfill different roles, type overlap can be acceptable. For instance, Amoongus plays a vastly different role than Rillaboom. You still don't want a lot of shared weaknesses between team members, though, so a team that consists of Ferrothorn, Amoongus, and Rillaboom is not good.
Overall, two Pokemon overlapping types does not automatically mean that you should not use both. There should not be too many shared weaknesses, but a few Pokemon of the same type is generally okay.
Hope I helped!