The best TV villain is undeniably Dr. Heinz Doofenshmirtz.
If you haven't heard of this brilliant feat of literal genius then you likely had a sub-par childhood. Dr Doofenshmirtz was the primary antagonist of Perry the Platypus in the hit kids show Phineas and Ferb. Not only is he an entertaining character who brings something new to each episode, but he also has a rich backstory that helps the audience sympathise with this lab coat-wearing villain.
In order to explain why this character is so great, you should first look at his tragic back story - something he likes to bring up frequently in quite detailed flashbacks.
Born in Gimmelschtump, Doofenshmirtz was neglected by his parents from the very start with neither of them bothering to even show up for his birth and attended none of his birthdays after. But their mental and physical abuse didn't end there, and some of their actions today will have resulted in serious prison time. At one point in time Heinz was disowned by his family but rather than giving him up to child support, he was kicked to the curb and forced to live with ocelots. Upon returning to his family, due to financial issues, the young Doofenshmirtz was forced to become a lawn gnome where he was forced to stand completely still 24 hours a day with no excuses, not even for food or sleep.
As if his family life couldn't be any worse, Heinz's personal life didn't seem to be looking out for him. Around the same time as his stay with ocelots, Heinz was cursed with an unfortunate aroma of pork (for reasons he did not want to elaborate) so strong no one would come near him. To cope with the loneliness, Doofenshmirtz made himself a friend in 'Baloony' (a balloon he drew a face on). Their relationship may have been a tad weird, it was actually one of the sweeter moments of his childhood, making it so much more tragic when Heinz lost his only friend.
His early life did turn him into the terror of a semi-aquatic egg-laying mammal, but he must be commended for not turning out so much worse.
I'm barely scratching the surface here with how tragic and terrible his early life was, but if I did, we would sadly be here a while. Yet while his early life did turn him into the terror of a semi-aquatic egg-laying mammal and the tri-state area, he must be commended for not turning out so much worse. Despite his clear genius-level intellect and wide range of advanced technology, very rarely does he pose harm to anyone and instead just uses his talents to solve his own personal gripes.
While Dr Doofenshmirtz is certainly in the career of evil, it can be well-argued that he isn't a bad person. Yes, he does go out of his way to benefit himself, no matter the inconvenience to those in the Tri-State Area, but he does give ample opportunity for his plans to be foiled. Each time Perry bursts in, Doofenshmirtz uses harmless methods to incapacitate the agent before fully explaining his plan and in more than one instance, give the platypus time to escape. This coupled with the fact that on many of his Inators he includes a self destruct button it hints at the fact that this is all just a cry for help. During the episode "No More Bunny Business" when Perry fails to turn up, Heinz makes himself a nemesis in the form of Planty the Potted Plant who manages to 'foil' the Dr's latest scheme further pointing to his self-destructive tendencies and need to be good.
Furthermore despite his traumatic childhood, Heinz Doofenshmirtz is actually a great parent to daughter Vanessa. While Vanessa isn't a fan of her dad's evil schemes and can quickly get annoyed or embarrassed by him, it cannot be denied that they both care for each other. Heinz made sure that, unlike himself, her daughter had a birthday party every single year which is most likely to help spare her of the misery he experienced in his youth.
There is also that time he saved a cat falling out of a tree.
So when I initially said that Dr. Heinz Doofenshmirtz was the best villain, I don't mean that he is the evilest but rather the most interesting. On the surface, he is a generic supervillain but as you peel back his layers he becomes so much more. Kinda like an onion.