It may or it may not.
Upgrading hardware is the easiest and most inefficient way to increase website speed. I suggest you to use Google pagespeed and from there analyze the cause of your slow site. Also deploy some sort of caching on your site before upgrading.
Before adding more hardware I would check if the bottleneck is actually in the website code. You didn't write what kind of technology stack/framework you're using, but if you're using something like Wordpress with lots of extensions and poorly optimized code it's usually better to get someone to optimize the code first.
Unless you're running out of memory, which most likely would result in lots of errors, you won't necessarily see any speed improves just by adding more RAM. Same with CPU cores; it will allow more simultaneous visitors but not improve page speed unless you're starved for resources.
Before investing your money in upgrading your server resources, kindly do your research and try to pin point the main issue with your site speed. It can be a lot of things, such as your hosting provider's infrastructure quality, errors within the website code, poor optimization, etc.
Adding resources is often the cheapest and fastest way to improve performance. Especially with something like response time.
But is it the best?
That depends. Tracking down and optimizing performance problems in both server configuration and code can be expensive, highly specialized, and time consuming tasks.
And how will you know?
You must start measuring. Measure response times, measure time to first byte, measure amount of data transferred. Automate these tests and measurements using some of the many tools out there for server monitoring. Graph the results.
Finding the right balance between more resources (cores, memory, ...) and server/code optimizations (programmer/admin hours) is up to you. I suggest you try a bit of both.
And remember, if you aren't measuring than there is no point trying to optimize.