There isn't and shouldn't be such a law. Europe has these KYC for IP address laws and it sucks.
Imagine if any time someone was caught driving drunk, the registered owner of the car went to jail.
This was fixed in 2018 by adding a special exception to the law. Other countries had public wifi a decade earlier. Germany still doesn't have much.