Its entirely dependant on your location, prices relative to said location, and your comfort replacing said components.
There isn't an answer thats true enough for a wide enough range of laptops, and while I could try to do this all for you, that would be asking a lot from a random stranger on the internet.
I should mention for ram though, if the ram is soldered, then I personally feel that if you think there is even a hint youll ever use even 75% of the ram you'll be getting with the machine, its probably better to get more ram, because not having enough ram can be a huge killer of longevity in a way that not many other components can.
If the ram is not soldered, much less pressure, and then you'd do that whole price comparison thing alone instead

