The difference is in how it directs the network data traffic.
The worst and the slowest because it blasts everyone is the hub. It’s sole purpose in life is to spread everything everywhere.
However the router and a switch are more precise in their traffic management. If it knows the data needs to goto the device on port 1. It will only direct that data to that port and others won’t be bombarded with everyone else’s data that it doesn’t care about.
So since you only need one router and when you expand you need make a choice between a switch or a hub. It again depends on how you want your data to flow.
Switch is best you don’t plug and unplug frequently and most of the devices are connected for the long haul.
Hubs are best if you’re plugging in/out of the network.
But in most cases, switches are more desirable for their speed due to better data traffic management.
Switches cost more because they literally contain a mini-computer that directs that traffic. So the more expensive the switch, the faster it will direct and get data to their destination.
There is no visual difference between a hub and a switch but a router that is a switch with more/greater responsibilities and capabilites usually it bigger with probably an antenna for wireless access.
Companies like AT&T, Verizon, Comcast and anyone else that moves a lot of digital traffic typically uses switches and routers that costs hundreds of thousands of dollars that does almost exactly the samething your home router/switch does but for $40.
Only difference is speed of that management where the big boy’s switches happen at 1/xxx,000,000,000,000 of a second while a home router happens at 1/xx,000,000 second.