Yeah, like SBM!!! said, "headcanon" is more of a general fandom term I got from just, you know, being a huge geek who's deeply involved and interested in fandom. But I don't think it's quite the same thing as "fanon".
I don't know what TV Tropes has to say about fanon, but my understanding of it is that it's something that's widely regarded as true in fandom (whether or not it actually is canon) rather than being specific to just one person. Like, a headcanon is something personal. People can share headcanons and maybe adopt ones that they like from other people but when you say "headcanon" it's usually specific to yourself. Also, fanon is usually treated with more derision, because it's become associated with fans believing something to be canon even though it's... really not.
An example of fanon in the Harry Potter fandom is this idea that many fans have of Draco coming from an abusive home. There is no evidence of this in the books. Quite the opposite, actually. Lucius is hard on Draco, sure, but both his parents obviously love him and spoil him, and Narcissa would do anything to protect her son, so I don't know where people got this idea that Lucius beats Draco and that Narcissa is some kind of passive trophy wife who doesn't care how her husband treats her son. If people want to write fan fics using this idea, fine, it's just fan fic, people can take some liberties. But when people start confusing it with canon, that's a problem.
Not all fanon is inherently bad or problematic, but I'm just saying it has a tendency to kind of get out of control.
Headcanon is something that's more personal and specific so it's less likely to negatively affect fandom's perceptions at large, and it also doesn't contradict or reinvent canon as fanon so often does. It just fills in blanks.
Am I making any kind of sense here? Fandom terminology is something that seems so natural to me, but I know it can get confusing sometimes for people who aren't as into fandom.