Do you allow players to go against their alignment? 5e [closed]

How do you enforce alignment? Is there a roll for something like this? IE. my Lawful Good character needs to lie to a child in order to achieve X. I roll a D20 and add my wisdom modifier and need a 15-20.

I’m creating a character for 5e and only ever played 3.5. Want to play LG but don’t want to be too constrained.