Chances are you're using Optimus/MSHybrid which means the internal display is connected to the Vega iGP, games are running on the NVIDIA gpu, and each frame has to be copied from one gpu to the other in order to be displayed (incurring some potentially significant overhead).
If your laptop has a 'mux switch', you can connect the internal display directly to the 1660 Ti and alleviate this. If not, you could try using an external monitor if you have one, as the display outs on most dual gpu laptops are connected to the discrete gpu (this can be verified in NVIDIA Control Panel). If neither of those things are an option, it could be worth a shot to try running tf2 on the AMD iGP instead of NVIDIA, as it may actually run better that way due to no copy overhead.
Of course your cpu is on the weaker side like doiku said, so make sure nothing's using much cpu time apart from tf2, verify it's not being thermal throttled into the ground, and if HP provides any settings relating to cTDP or other power limits, set them to the highest available.