When i developed for wordpress, i too had this issue. My solution was to set up a virtualbox running debian with 2 set cores and 2GB of ram using the netinstall, then set up openlitespeed and the usual with lsphp. XAMPP uses apache but with only essentials, so you do not get php-fpm and other goodies as the idea is on xampp is that it works rather than it works fast.
Since wordpress setups tend to be heavy on resource, not even a high spec machine will run xampp and wordpress well. The easiest solution is to use virtualbox and set up openlitespeed (with 2GB of ram you could install cyberpanel enterprise package for free, ready to use on install with all webserver utilities). This is why most hosts like around 80% including "wordpress recommended" are actually super slow and terrible. Where i work we have our own dedicated server for client wordpress sites that we optimise for to make it very fast, where even a thousand hits on the login page in a second takes barely any resource rather than relying on a shared host for each client.
Apache is actually very slow for your typical plugin heavy wordpress, and needs a lot of tweaking to run fast. Openlitespeed comes ready to use so you only have to configure your hosts file and virtual hosts to get started with a lot of performance