Internet dosn't work when connecting hdmi / usb hub
Try this, go to system preferences then network preferences. Select Thunderbolt Ethernet and "make service inactive" (click sprocket icon at the bottom)

This improved my WiFi connection speed.  My thought being that Thunderbolt is a multipurpose port also used for ethernet and may be taking priority when it is plugged into any device.  If you are using WiFi Thunderbolt ethernet is obviously not needed.