Hello in that budget you could fit a 3990x the only problem will be what gpu you want. The price of the configuration will also depend on the prices in your country but here is something that could work ok in that price range.
1. Cpu - 3990x
2. Asus Strix-XE Gaming TRX40 ( you could opt for a higher-end motherboard if you want to spend more money like a Zenith 2 Extereme or Alpha)
3. 128gb Kingston DDR4 3200Mhz 4x32sticks
4. 1200w Be Quiet platinum PSU or Corsair HX for example
5. 1TB Samsung 980 PRO Nvme SSD
6. RTX 3060 of any brand (the cheapest best buy RTX solution since it provides 12GB of ram, you could go with a better card but if you are not doing gpu rendering or gaming no point at all)
7. ICEGIANT ProSiphon Elite or Noctua NH-U14S for TR4 socket or if you want to spend even more money than a custom loop but be prepared to buy up to 3xtimes in respect to any air solution
8. Fractal Design Meshify 2 XL - great case, huge can fit anything inside plus the airflow is great! I have one :)
To conclude you have 3 components where you can save or spend more money. That would be the 1.motherboard where depending on your needs you can spend x2.
Pretty much all the motherboards even the ones that cost 400-500 euros will have enough vrm power to run your 3990x without any issues on stock, some even overclocked.
2. The GPU where you can spend x5 :) and the cooling as number 3 which is probably the most important part where you can spend up to x3-4.
Keep in mind that the above mentioned air coolers will run your 3990x perfectly at stock but if you want to use PBO or do any kind of extreme overclocking you will need a custom loop solution.