I feel like these terms need to be defined so that everyone is on the same page. As I understand them:
Minmaxing:
Maxing your primary attributes/gear/abilities at the cost of minimizing things you deem non-essential to your character's primary purpose. A minmaxed character should have a 17 in their primary, a 16 in their secondary, and 8 or 9 in ~two "dump" stats (with Point Buy). They have obvious and devastating weaknesses.
Powergaming:
Related to minmaxing, but more about Being Maximally Effective Overall than Being the Best at One Thing. Such a player will choose feats/spells/multiclassing to be the most effective character and focus on using optimal tactics while in combat. They *can and often will* minmax, but it's not a prerequisite. If only some players powergame, combats will be unbalanced and the DM will likely need to compensate somehow.
Munchkining:
The more advanced form of powergamer, who makes heavy use of unintended combinations via exploits, loopholes, and vagueness in the rules. A munchkin is a powergamer, but a powergamer isn't necessarily a munchkin.
Optimizing, or "Playing an Effective & Well-Rounded Character":
Basically what @Kanisatha describes above. Your primary stat is good (16 with Point Buy), your secondary stats are okay but not necessary amazing (~12-14), and you don't necessarily have multiple dump stats.
Playing a suboptimal, but still effective, character (usually for roleplay reasons):
Similar to above, but you *slightly* decrease some of your primary/secondary stats. The focus is more on creating the believable character that you want to roleplay as. I'd argue that there's still a minimum Primary Ability Score that you can have and still be in this category: 14. Anything lower, unless you prepare by e.g., only taking buff/area control spells, and you are...
Gimping your Character: ([In Solo Play] Doing a Challenge Run, or [In Multiplayer] Being an Ineffective Teammate)
Building a character that is so unoptimized that they don't pull anywhere near their weight and actively make it harder for the team to succeed. E.g., a Wizard with an Int of 10 or less; a Frontline Fighter with <10 Con; a Monk with <10 Wis. These characters will spend most of their time doing little damage, missing, dying, or dead.
Importantly, none of the above are *necessarily exclusive* with good roleplay. Powergamers can be good roleplayers while suboptimal-character players can be That Guy, and vice versa.
Hmm I would be a minmaxer for sure.
I once had a DM that did a house rule that characters had to use his unique very forgiving version of a point buy. The point buy allowed a max score of 20, no minimum score, using a 50 point buy. so the character i made had a intelligence of 2 for a dump stat. The specific thing focused in that build is how big of a bonus to damage could i add. Keep in mind this build had divine smite and eldritch smite. as well, buty was mostly focusing on the flat bonuses to damage. So hexblade made his weapon attacks Cha, also lifedrinker was Cha, and aura of hate from oathbreaker was Cha. with a 20 charisma score. He used a unique weapon called a heavy spear. ( Two handed version of the spear, not meant to be thrown)
The game had a lot of things like mind flayers and such and the big advantage of a 2 int was they couldn't mentally track me. His first magic item was a headband of intellect, so when i was hiding from them i could take it off , and when in combat i would put it back on... even if say an intellect devourer brought my int to 0, the headband kept it set at a 19 int so they couldn't take my body over , unless i took it off before a long rest. The game was planned to go to lvl 20, so the plan for that character was to go 8 lvls oathbreaker paladin /12 lvls hexblade with pact of the blade. I and the dm had it worked out that on the very last battle in the campiagn when we were to fight the campaign's end boss, I Would betray the party and side with the big bad. ( my character was struggling with mental illness from a traumatic loss, that by the end of the game would push him from chaotic neutral to chaotic evil as he finally gives in and embraces the hate and anger inside ( he gets turned to the dark side of the force basically.) during the campaign I was working on the party the whole time recruiting allies for the final fight. I got one person to turn to the darkside with me at the end. One fun feature is the character orginally was paladin of the crown, his family was raped and murdered, and there had been an attempted assassination attempt on him and his other royal guards , as the evil prince took hold of power, and wanted to clear away the kings loyalists. His father had been a good king, but his son the crown prince was jelious of my character when his father found me after scouring the remains of a village that was ransacked. i was just a child them, and the good king adopted me. The prince was jelious because he felt his father loved my character more and became bitter and turned evil and resented his father in secret. so when it became time the prince assumed control of the throne the attempted at my life and my family was also meant to make them an examples saying " this is what happens when you cross him. And he ruled instilling fear into his subjects. The loss of his wife and 5 year old daughter pushed him to such grief and rage that he broke his oath, it is at that time Zehir came down in the form of a talking serpent to promise me power and retribution if I only help him with his issue of attempting again to take over dragonkind and kill tiamat and bruhamut. It just so happened though lol ... that we had a dragonborn war cleric in the party that worshiped Bruhamut. The DM wanted to test how far I would take my character , so he gave me this sentient magic item that gave me enhancements , but the cost was i needed to fuel it with the souls of intelligent creatures. the creature didn't die when it had its soul removed, rather they remained in a vegetative comma stat. So to fuel it I would sneak out of the camp at night and kill a kobold or something with it, the more innocent the soul taken the more powerful its effects. My character did not see this as evil btw , his rage made him justify his actions for the greater good in how he saw things. to him what was the cost of a few innocent lives , to find vengeance, and free his nation of millions. they were sacrifices to the greater good. the morale there is be wary not to become the thing you hate in the search for justice.