Easiest way to do this: Turn the modem off after bed time (you will also lose internet)
Most expensive but still easy way to do this: Buy a "smart router" with time-based parental controls (lets you use the internet at night).
Nerd way to do this: Pihole with a script that enables and disables certain blocklists at certain times (free and open source, because fuck "smart" products)
The cheapst way is this: Don't lie to your children. Take responsibility for your choices. Talk to your children and explain why an adult needs to make responsible choices.
I agree with all of this... Might cost you some time and fights depending on how poorly you did raising the kid to this age though... But now this kid is going to go into school adamant that the game can't be played at night... You've set him up for serious ridicule because you're too lazy to parent well
As a nerd, I don't expect my parental control settings to work forever. They're more there to prevent childish naivete from getting them into trouble, they probably won't stop dedicated teen horniness. And I won't even be mad, figuring out how to get around them requires learning more about how technology works.