Times have changed and it's no longer about the i5, i7, and i9 tiers alone.
The individual clock speed plays an important factor. For instance, that 7700HQ will tell you what you need to know. Should aim for a CPU that has 12000 for that number. Here is a guide to understand the nomenclature.
That GPU is about the same as mine (1060 GTX), it will not be doing you any favors with that 4GB of VRAM. This game drinks VRAM like Kool-Aid, getting a card with at least 12GB - 16GB VRAM should be the minimum. Again times have changed and it's not just about getting the highest second number (a 4090 RTX is not necessarily the best just because it's the highest one NVIDIA sells at the moment).
16GB RAM is okay, getting two sticks of 16GB RAM (32GB) and you won't have to look at RAM again really.
Storage space is good enough.
If your friend is giving this to you as a gift then that's a nice friend, unfortunately, it will not play this game to the best of its ability. Stick to Low Textures in the settings and you should be able to play. Do you want to be making gigantic maps? Absolutely not, but you can still have a great time in Freeplay either playing the game legit or as a virtual model railroad. Tips for playing can only be given once we know what type of player you are. Do you want to follow in-game objectives, or do you just want to build whatever designs come to mind?
In your situation, before you even start to give your performance a fighting chance you want the Population Factor and Town Tuning Mods. They are without a shadow of a doubt your only fighting chance for keeping a decent performance
Hope this was helpful.