Apple still cares about security for old iPhones and iPads. iOS 12.5.6 has recently been released for devices that cannot install a higher version of iOS. However, Apple still pays attention to security.
Apple fixes the vulnerabilities that were included in the latest iOS 15 update. This means that you are not exposing yourself to an unnecessarily high risk on the Internet when using the older devices.
Devices running on iOS 12 and able to install the new security update are: iPhone 5s, iPhone 6, iPhone 6 Plus, iPod touch 6, the first iPad Air, and iPad mini 2 and 3.