I just came to understand that the bandwidth is just the difference between the highest and the lowest frequency of transmission.
And i also have and understanding that higher the frequency ==> higher the speed as more data can be transmitted in one second.
Suppose the lowest bandwidth and highest bandwidth are close but both are very high.
That would mean very high internet speed but low bandwidth.
This is not how internet speed work.
When you connect to a server and you initiate a data transfer, packets are sent simultaneously every second. The more packets are sent, the more bandwidth you use, but also the faster your connection is.
The bandwidth means: how much packets can be sent at the same time. So if the bandwidth is very low, only very few packets are sent at the same time.
That said, if your bandwidth is big, it can send a lot of packets at the same time, but its not a guarantee that this will actually happen. If the other side of the connection has a small bandwidth, then that will make the entire connection slow as only few packets per second can be exchanged. So even if you have a wide bandwidth, you are bottlenecked on the other side.
If you have lots of bandwidth but the speed itself is slow (for example, your data travels all across the world, or you use a 56k6 modem or other slow device, or other factor that makes the connection slow) you can still exchange a lot of information at the same time, it just takes longer to arrive. So this will increase the ping time (latency) but not affect the speed.
An analogy: Lets assume you have 2 cities. There is lots of car traffic between the cities. If there’s only a 2 lane highway, once the traffic reaches a certain amount of cars, a traffic jam will occur, meaning, a certain number of cars can drive on this road without congestion, but not too many. Now, if you replace this highway with a 20 lane highway, suddenly far more cars can drive on this road, allowing for far more cars in total. If the cars is the data, and there is more, then to transmit a fixed amount of data, the more can be sent in one go, the quicker it is over, thus the faster the internet connection is.