If you are troubleshooting this device, remember that the hardware is likely sound; the issue usually lies in finding the correct manufacturer-specific driver file or adjusting Windows power settings to keep the connection alive.
from Realtek for macOS 10.15+.
Support is limited for newer macOS versions (Catalina and later). realtek 8188gu wireless lan 802.11n usb nic driver