Wowsers, that's pretty old. I saw "Pentium E5400", and immediately thought, Coffee Lake Pentium, then I saw "DDR2", then I was like, uh-oh, that's a "Pentium Dual-Core", a Core2-era processor.
Basically, that's (as been said) a museum-piece. Either preserve it, or junk it, IMHO.
Or, as also already said, pick up a cheap SSD (120GB for $16, 240GB for $23-27), and throw that in there, with a new copy of Windows 10. (If you have the key to your Windows 7, you should be able to punch it into Windows 10, to activate it.)
The SSD solution would be better than nothing, and might breath some new life into it (if you can't afford a new rig right off). Don't forget a web browser with an ad-blocker, too, for an older CPU machine like that. I recommend Firefox Nightly, with uBlock Origin, and Privacy Badger, and set the browser's own Content-Blocking to "Strict".
If building new, then, start a thread in Computer Building, but I recommend a Ryzen R5 3600 CPU for ~$200 (or it's older brother, the Ryzen R5 1600 for ~$105), 16GB of DDR4-3000 or faster RAM ($60 or so, there's some OLOy DDR4-2667 16GB kit for ~$50 right now). Pick a mobo to suit (MSI B450 Tomahawk comes to mind as popular for the 3rd-Gen upgrades for around $110-120, be aware that the BIOS/UEFI is slightly immature for the older-than-X570 boards and newer 3rd-Gen Ryzen CPUs. That mobo has BIOS flashback using a USB port, so you don't need an older CPU to flash that board, to prepare it for 3rd-Gen Ryzen. It also has robust VRMs, to take a 3900X or 3950X, when that time comes.)
There also was an MSI PRO B450 V2 board for ~$65, that had a BIOS that worked with 3rd-Gen Ryzen, that would be the budget option, but with naked VRMs (no heatsink), it probably wouldn't be good for a 3900X or 3950X, if you felt like upgrading in the future.