Under most circumstances the cantrip Light will beat the spell Darkness and make it fail to work in the overlapping field of effect.
Light is a cantrip, and under the rules cantrips are always cast at a spell level equal to the highest you can cast:
"A cantrip is always automatically heightened to the highest level of spell you can cast in the class. This makes a cantrip a 1st-level spell if you can cast 1st-level spells, a 2nd-level spell if you can cast 2nd-level spells, and so on."
Darkness is a level 2 spell, with a level 4 heighten.
Here's how light and darness interact:
"Light and Darkness
Light and darkness from magical and nonmagical sources interact in specific ways. Nonmagical light always shines in nonmagical darkness and always fails to shine in magical darkness. Magical light always shines in nonmagical darkness, but it shines in magical darkness only if the light spell has a higher level than the darkness effect. Spells with the darkness trait or the light trait can always dispel one another, but bringing light and darkness into contact doesn’t automatically cause one to dispel the other. You must cast a light spell on a darkness effect directly to dispel it (and vice versa), though certain spells automatically attempt to dispel opposing effects and describe how they do so."
So, most of the time Light (always cast at max level) will overpower Darkness (cast at level 2 or 4 only). Is this intended?
It does mean that most castings of Darkness will be easily ignored by a same-level PC having a Light cantrip going.
Note: How does the Shadow creature ability Cast Shadow interact with this? It doesn't give an effect level, nor does it appear to reference the spell. It's clearly a magical darkness effect but that relies on effect level to adjudicate.
It is clear that casting Light as a cantrip will always dispel any Darkness effect of any level, and vice versa, because all light effects and darkness effects can always dispel each other.
Thanks. :)