There were multiple types of iPods, existing simultaneously to give customers different options. There were multiple generations of each of these product lines.
There was the original, which was first called iPod, then iPod photo (when it got a color screen), then iPod video (when it gained the ability to play videos), and finally known as iPod Classic. This was always based on a mechanical hard drive and offered the most storage capacity.
The iPod mini became available as cheaper, more compact, and colorful option but with less storage capacity. It still used a mechanical hard drive, but it was a physically smaller one. This became the most popular iPod of its time.
The iPod nano was introduced and replaced the iPod mini line. It was thinner than the mini, and based on flash memory.
The iPod shuffle was the smallest and cheapest iPod. It had no screen, but you could listen to your music on shuffle and have basic button controls like play/pause, fast forward, rewind, and volume.
The iPod touch line is the only one introduced after the launch of the first iPhone, and it has always been based on the iPhone. It is the iPhone without the phone. It runs the same iOS operating system and the same apps and games, but with no cellular connection and instead it only has WiFi and Bluetooth. It also had no GPS, and used older or lower end processors, camera, and display.
In the early years of iPhone and Android, cellular data was expensive. The iPod touch was a way to get an iPhone like experience without the expensive monthly fees and contracts of a carrier. It was also something parents could buy for their kids, for much less than a phone.
If Apple wanted to, they could have continued upgrading the iPod touch with faster processors, more storage, better display, better camera, just like they keep improving on the iPhone, but they chose not to. Most people these days just use their phone, and they can get an iPhone SE, or an older iPhones (including hand-me-downs or buying used), or a cheap Android phone, and they can buy it unlocked and use it without a phone carrier if they want to.