It actually mostly depends on what operating system it’s running, and what version of that OS it is.
But sometimes, the specific model of that model comes into play. (You can only downgrade 2nd gen iPod Touches that start with “MB” for the serial number, mine starts with “MC”. Also, KS, the first two letters are common, it’s not the entire serial number)