If a user is part of multiple security groups, the policy assigned to that user is determined by the policy prioritization logic set by the admin in the Safety Console. The priority of a policy is indicated by the alphanumeric P1, P2, P5, etc. displayed alongside the policy name. Note that the lower the numerical value, the higher the priority of the policy. So policy marked P1 will take precedence over a policy marked P5. To learn how to assign priorities, check the KB here.
If the user is part of any custom group and that group is assigned a policy different from the security group, the custom group policy will take priority.
*Ensure that you do not have more than one group with the same name. If you do, both/ all of them will be assigned the same policy. You cannot assign different policies to each of them.