Not true, iPhones get laggy if you update the iOS. My iPhone 7 Plus is still at iOS 10 and there is no lag, same goes to iPhone 8 Plus at iOS 11.
For me I always believe that the latest iOS is catered for latest iPhones, not meant for the old one. Even if iOS 13 comes out, I also won’t be upgrading to iOS 13 for my iPhone XS Max. I want iOS 13 I will just get the next generation iPhone.
Same goes for iPadOS as well, I believe that it is made for 2018 iPad Pros, that’s why I will be upgrading my 12.9 iPad Pro 2018 when iPadOS releases. My 10.5 iPad Pro will stay at iOS 11 and the rest of my iPads will stay at the previous iOS. If you look carefully at their iPadOS page, they never put those iPad with home button. Only the 2018 iPad Pros.
actually iphones are the only phones that get laggy after 1 - 2 years, the issue was so bad that apple had to have a battery replacement program
androids keep their performance even after 5 years