One trick with warlock is to equip a dagger in each hand. Then you can use your action to Eldritch Blast, then run in an stab your target for the LOLs.
[Warning, do not try this in a tabletop game, your DM will slap you.]
This works in Baldur's Gate 3, but it's not actually allowed in D&D 5th edition rules. Two weapon fighting states that "When you take the Attack action and attack with a light melee weapon..." Spells, including cantrips such as Eldritch Blast, don't fullfill this requirement for using the bonus action for a second melee attack.