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.