You mention you run on Medium now - what kind of performance do you get if you go up to High presets? Ultra? Is the FPS loss dramatic? Is FPS something you particularly care about?
What you should upgrade first kind of depends on what you want to achieve. If it’s higher FPS, that’s one thing; if it’s smoothness (no stutters), that’s another; if it’s higher settings, that’s yet another. They’re all related but not the same.
In the dev mode FPS display, are you mostly ‘limited by main thread’ or ‘limited by GPU’? I suspect it will be the latter but would be useful for you to test and see, if you haven’t already.
If main-thread limited then my approach would be to upgrade the CPU and RAM. A 13th gen Intel CPU would also mean a new motherboard. Ideally a move to DDR5 as well, which would mean replacing your RAM entirely (you could buy a Z790 board with DDR4 support, but you would probably benefit from faster RAM speeds anyway, so again, if it were me, I’d go to DDR5). You could upgrade mobo, CPU (let’s say 13700K) and get 32GB DDR5 just about within your max budget, with careful component choice; you would probably need a new cooler due to the new socket.
If GPU-limited, then I would upgrade the GPU, but given where you are now that means 4000-series and that gets expensive quickly. The new 4070 Ti would be a significant uplift on your existing card and should have a reasonable RRP but will be hard to get hold of (Scan has some in stock at about £840). 4090s can be bought easily enough now but at well over £1K it’s probably not where you want to be. The 4080 is running at about £1200 in the UK from what I can see.
The theoretical best upgrade would be to do all of the above, but for a bit-by-bit upgrade my own gut instinct would be to go CPU + RAM first.
Edit: FWIW, my own best upgrade was to go to intel 13th gen + DDR5 and stick with my existing GPU, but that is a 3080 Ti and is no slouch as it is, and I generally a) run on High presets just for headroom in complex scenery, and b) I lock at 30 FPS and that’s fine for me, I know others are not happy with that.