So, as a rule of thumb, the solar panel loses approximately 1% per year. So after 30 years it's generating around 70% of rated capacity.
At that (or any earlier or later) point one could replace the panels. That's really cheap to do, and can be done with more-or-less unskilled labor.
If you are space-constrained (like your residential roof) then you'll likely do it earlier.
If you are a commercial producer, sitting in a desert somewhere, it'll likely be better to just "plant another field" next door. Keep the 70% (it's free), and bolster capacity by adding more panels, not replacing old ones.
And this is before we take into account places where the ecology under the panels has changed and become more valuable in its own right.
So 25 years from now, or maybe 10 years from now, it might pay to replace panels. Which may in turn lead to very cheap 75% 2nd hand panels becoming widely available.
That 1% finger in the air estimate is what installers or sales people tend to use to give people a vague idea what to expect. Your panels will not make as much power in 25 years as they do today. But because weather happens the hypothetical input power - sunlight falling on the panels, can vary maybe 5% from one year to the next, larger than the degradation in any single year no question. So it's very possible a solar PV roof has its "best" year in year two or three even though that's not intuitive.