We can't give you a definitive answer on that as this is a user to user only forum. In terms of security updates, Apple just released a security update (not new feature update) for iPhone 7 to iOS 15.8.4 and for iPhone 8 and X to iOS 16.7.11. iPhone 7 was released in 2016, 9 years ago. So we can see that even very old iPhone's may still get security updates.
In terms of major iOS upgrades (like from iOS 18 to iOS 19), iPhone's typically see a 5 to 6 year cycle for those. The iPhone SE 3rd Gen was released in 2022, so you should get major iOS updates and security updates for a few more years at a minimum.