John’s answer is great, but there’s more that can be expanded on here to explain why you are having such issues.
First off, I think it’s worth mentioning that depending on what you are doing, Linux will run fine on a system with only 32MB of RAM, and you can go even lower than that in rare cases through aggressive customization. Such setups are only really useful for single-purpose network appliances though (like routers). 4GB can be enough for desktop usage with Linux, but only with very lightweight desktop environments like XFCE or LXDE. Windows, as John mentioned, needs at least 8GB to run comfortably. The caveat to this though is that for a 12 year old machine, 4GB may be the absolute best it can do. That was a reasonable amount of memory a decade ago for a portable system like a laptop.
There are three other issues though.
The first is that a Core 2 Duo is not really an appropriate processor for the development work it sounds like you are trying to do. It’s not particularly fast (for a client system at least), doesn’t have good parallelism, and arguably most importantly has at best mediocre cache performance. It’s theoretically acceptable though (2GHz is actually right about the clock speed for a lot of modern server processors, and they obviously do fine with workloads like you are talking about), were it not for the fact that it’s the cause of the other limitations. There’s nothing you can do about this though, because the CPU is soldered to the mainboard (that model of CPU was only available in a BGA package).
The second issue is that you probably have at best SATA 2 support for the storage device. This translates to half the theoretical bandwidth you would get from the same SSD in a modern system, which means that the SSD is only really reducing your latency, not improving your throughput (a good HDD from that era could actually saturate a SATA 2 link under some circumstances, which is why SATA 3 was developed). This performance limitation is going to seriously impact system usability when you have to hit swap or the pagefile, which is going to happen more often because you have only 4GB of RAM and are trying to run a memory-intensive workload. There’s nothing you can do about this either, because SATA support is a function of the chipset, which quite simply cannot be changed on laptops.
The third, and probably biggest after total RAM capacity, issue is that you’re dealing with DDR2-800 RAM. That is, quite simply, so slow as to not be practically usable for any modern memory-intensive workload, and the issue is further compounded by the poor cache size and performance of the CPU, and actually makes the SATA performance limitations even worse (the RAM is actually slower than your SATA link, which means that the RAM is the limiting factor for your storage performance). This is, yet again, not something you can do anything about because it’s a property of the CPU itself.
Overall the general assessment is that you need to just replace the system. If you don’t need the mobility of a laptop, I would probably suggest looking at an NUC. One of the older i3 or i5 models plus 8GB of RAM and an inexpensive SSD will cost you about 500-700 USD and make this old laptop look pathetic in comparison, and will probably use less power too. If it needs to be a laptop, I’m at a bit of a loss for a recommendation, as all the brands I would recommend are either likely to be well beyond your price range, or are completely sold out right now.