The blog at https://techcommunity.microsoft.com/t5/microsoft-endpoint-manager-blog/unified-endpoint-security-using-microsoft-endpoint-manager/ba-p/1417736 covers this.
Basically, there is no correct way other than not configuring it in both places as this may create a conflict and may be difficult to troubleshoot. In general, the security baselines are easier to work with and should be preferred but they don't necessarily contain every setting so can be supplemented as or if needed by configuration profiles.
There's a also a (longer) video at https://www.youtube.com/watch?v=f4klwWewXe0 that covers this as well.