Apps cannot be directly transferred between devices. Apps, if they remain available for - and are compatible with a replacement iPad - must be downloaded and installed from the Apple App Store.
Here is a list of the highest version of iOS supported by the older models of iPad (for simplicity - “generations” are shortened to a number) that are restricted in their ability to be updated:
32-bit devices (obsolete)
iPad1 - iOS 5.1.1
iPad2, iPad3 and iPad mini1 - iOS 9.3.5 (WiFi Only models), iOS 9.3.6 (WiFi+Cellular)
iPad4 - iOS 10.3.3 (WiFi Only), iOS 10.3.4 (WiFi+Cellular)
64-bit devices
iPad Air1*, iPad mini2 and iPad mini3* - iOS 12.5.7
iPad Air2, iPad mini4 - iPadOS 15.8.3
iPad5, iPad Pro (9.7"/12.9" 1st generation)* - iPadOS 16.7.10
iPad6, iPad Pro (10.5"/12.9" 2nd generation) - iPadOS 17.7.5
(*) obsolete
Newer models are all able to be updated to the current version - iPadOS 18.3.2
- iPad Pro 13" (M4)
- iPad Pro 12.9" (3rd generation and later)
- iPad Pro 11" (1st generation and later + M4)
- iPad Air (3rd generation and later + M2/M3)
- iPad (7th generation and later)
- iPad mini (5th generation and later + A17 Pro)
You need to consider that compatible Apps for older models of iPad may no longer be available. App Developers have dropped all support for 32-bit devices. All 32-bit Apps have been retired and removed from the Apple App Store which will severely limit the usefulness and utility of these very old iPads. As such, if you want or need to access currently available Apps that require a more recent versions of iOS than the iPad is capable, you’ll need to consider a much newer or current iPad model.
You also need to be aware that many App Developers only support the current and perhaps one or two prior major versions of iOS/iPadOS - and for this reason App availability may be restricted for many older models of iPad. Many online services and websites also won't work or accept connections from unsupported browser Apps or older versions of Operating Systems that don't meet current security requirements.
In conclusion, considering purchase of very old models of iPad is ill advised. Purchase of an obsolete model is simply asking for disappointment.