Working on the same codebase almost daily for 4y+, one thing I noticed is that the temporary hacks will stay around for years and great ideas with thoroughly thought out solutions might be replaced or completely removed in a few months down the line.
Knowing what we need in the future is really hard. We always have to plan also for the opposite of our assumptions. We have to be able to maintain a piece of code for a long time but we also have to be able to throw it away again next week.
Another thing I noticed is that decisions are only right in the current context. Document this well. In a few years down the line you come to the opposite conclusion. And a year later you change your mind again. We moved from monolith to services to monolith and to services again