Is the iPhone 13 worth buying in 2025?

I'm planning on buying the iPhone 13, but I want to make sure I'll be able to use if for at least 3 years. Do you know when it will be one obsolete? Also, once they stop receiving softwares updates, am I able to use it with an outdated software?