Only Apple knows how long Apple will continue to support macOS on X86-64.
When Apple moved from PowerPC to Intel, the last PowerMac G5 (Late 2005) only got updates up to Mac OS X Leopard (released 2007). The last update to Mac OS X Leopard was released in 2009. Therefore, technically, Apple continued support the G5 for "years and years".
So, I feel that spending on a new build is quite a gamble and I would probably be better of saving that cash and applying towards an Apple Silicon Mac.
In my opinion, this is a much wiser decision. I've been seeing the 9900K on sale at great prices. In fact, I upgraded from i5-9400F to 9900K a few months back when I found it on sale for about $340. The 9900K performs very well and is pretty much the equivalent of a 10700K.