How do they know?
Because the IP‘s of the proxy/VPN you use is publicly known. So as soon as they receive a package from that IP they know the user is using such services.
How do they know?
If they’re more sophisticated, they have lists of VPN server IPs, and compare every user’s IP against those lists
There’s an even simpler way: Just look up the ASN of the IP’s associated ISP, and block it, if it matches the ASN of a datacenter ISP
Proton VPN offers special VPN servers for streaming, they can circumvent the second type of blocking by using residential IP address ranges, but not the first one. But they generally have pretty good IP reputation (at least on their paid servers, free is a whole different story, but I don’t think they even give a fuck), because they’re pretty good at anti-abuse.