if its an older hub and just isn't playing nice with the MBA due to age, the only good way to determine if it has issues itself or its actually the MBA is to go get yourself a newer hub and see what happens. The age of the hub is probably why you're not getting internet while the 'old' hub is connected to the 'NEW' MBA. Hubs aren't really all that expensive and the one linked below is the one I use with my MBP without any issue, used it both with Monterey and now Ventura.
https://www.amazon.com/gp/product/B08CDR6978/ref=ppx\_yo\_dt\_b\_search\_asin\_image?ie=UTF8&th=1