Hi nick_tnt,
We understand you have questions on how long Apple devices are compatible with each other. We're happy to offer some guidance.
As far as software compatibility, Apple doesn't seem to list a set timeframe specifically for that, however it generally falls within the time that a device moves to "obsolete" status. Apple uses the terms "Vintage" and "Obsolete" to classify the hardware serviceability of a device. If a device hasn't been sold by Apple for 5-7 years, it is considered vintage. If a device hasn't been sold by Apple for more than 7 years, it is considered obsolete.
Obtaining service for your Apple product after an expired warranty
Now the software updates typically fall in line with that timeframe. Once a device has reached the obsolete mark (more than 7 years old) is generally when they become too old to run whatever current version of software Apple releases.
As far as iTunes compatibility with newer devices, unfortunately Apple doesn't specifically list that information anywhere, so it's not really known if say an iPhone 13 running iOS 15 can connect to a Mac from the early 2000's running a version of iTunes from then. More information on your computer (the model year) and software it is currently running would help as well to see if it is running the newest possible software on it.
Hope this helps. Cheers!