Technologically, it’s the same system used to generate ads that are customized for your location. And no, I’m not just talking about “Hot MILFs in <your town> want to meet you!” (though that’s included): It’s also things like ads for normal local businesses.
This type of law, when applied to a global market, only has the effect of shutting down or restricting the sites you have legal power over, thereby shifting viewers to even sketchier sites the government has no control over whatsoever. Stupid.
It’s also ineffective. Some browsers even come with their own VPNs now. Getting around this is trivial.
“Well, I was trying to protect the children! Why are you against that?” they’d say. Not you in particular, just that this law seems performative, as others have mentioned as well.