It is generally recommended to apply sunscreen first, allow it to set, and then apply your makeup primer. This ensures proper sun protection and the benefits of the primer.