Strictly gaming for game - 3080 TI, as it actually out performs the 3090 in a good amount of games, so won't see much improvement for the cost (even at 4K the 3080 itself is probably a better deal). The 12 GB of VRAM will be future proof enough to last three to four years before you start having to decrease settings for FPS (IMO)
Productivity / work as main focus - 3090 is the king there, so if you can afford it, get it.
As other said, 3090 will hold retail value better since it is the top of the line (the Titan) of this generation but how often do you sell your components and hopefully when you think about selling, we are out of this crazy market so won't hold as much weight as people can get the current gen without issues (hopefully)