How click checkbox with CSS locator ::after using playwright

I have to click checkbox for term & conditions. I have used .click() and .check in my code. But when I am running the code, it's clicking on the terms & conditions and it's redirecting to another page. can you suggest any help. below is my html enter image description here

When I hover mouse to ::before and ::after checkbox is highlighting. enter image description here



How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum