I don’t really understand the difference between the two CPUs (2.3GHz i5 on nTB vs. 3.1GHz i5 on TB.) Can someone please explain and provide some real-world examples of the difference as well please!
The main difference lies in the TDP; Thermal design point. This is how much power each of the two CPUs is allowed to use basically. The TDP in the TB model is 28W and the one in the nTB one is 15W. This is both CPU and GPU combined. Now as is evident by the 2.3GHz vs. 3.1GHz you list yourself, this of course shows in the clock speeds. The GPU clock speeds are not listed on the spec but they are also affected, especially when both CPU and GPU are under load.
Real world differences aren't easy to quantify, but on paper, there's probably somewhere between a 25% and a 38% difference between the two chips. I'd assume somewhere around 10-15% in GPU workloads.
Those numbers of course don't necessarily reflect much with respect to smoothness of operation, but in that case they should be pretty indistinguishable and only in tasks that do longer computations over time should the jump really be seen (for the most part - games and certain workloads are exceptions).
With RAM, it generally works such that if you have enough you don't benefit from more. macOS does do intelligent caching which means that it tries to utilise the unused RAM to ready things from your SSD that may become useful, but even then, if you have enough RAM there's not much benefit to more. That said, apps and the OS will continue to demand more and more RAM, so enough today may not be enough tomorrow.
With respect to future-proofing, RAM is the biggest factor, although I never recommend focussing too much on future-proofing, since what you get extra for $500 more today, could've been gotten for $5 at the point the computer would've been useless without that, and the performance/cost ratio is much worse when trying to future proof the machine you buy today than if you buy a machine for what you need now, and spend the money saved from not future proofing on a similarly spec'd machine 3-5 years later, or whenever the computer no longer serves your need.
That said, this is of course only relevant when there's a price increase to the future-proofing. In this case, if you won't really benefit from a faster CPU/GPU and the TB, you may see a longer lifespan with more RAM: If the extra CPU and GPU power would be useful to you, I'd take that as a priority. But with your stated use case, I wouldn't worry too much about that extra CPUU/GPU performance.