https://docs.microsoft.com/en-us/windows/privacy/configure-w...
Personally i use ancient trick that block telemetry on metered connection, and you can set LAN to be metered too via registry key.
No idea if it still works to be honest.
https://docs.microsoft.com/en-us/windows/privacy/configure-w...