Could just be that your GPU is on its last legs... Do you know what GPU it is, or how old it is? One last thing you can try is making sure your graphics drivers are updated, but that shouldn't cause the issues you're having
If it is your GPU, and you're not really looking to get a new computer just yet, it might be worth investing in a new GPU, since those can be easily transferred to a new computer if/when you get one. For TF2, a neat little card is the GTX 1050. Not too expensive, and easily powerful enough to run all games out rn on at least low/medium settings. TF2 isn't a graphically intensive game, so a 1050 would be more than enough. Maybe look at a 1050 Ti if you've got the money. A little more in price, but a decent upgrade from the standard 1050