I want to play a Hexblade/pact of the blade warlock what’s the optimal way to play/use the character in combat? [closed]

I’m about to play my third ever session of D&D. I’ve been watching live-play for a while but haven’t played much. I’ve made a Levistus Tiefling Warlock with Pact of the Blade and a Hexblade patron starting at level 15.

character info:

Eldritch Invocations.

1-Agonizing Blast. 2-Lifedrinker. 3-Thirsting Blade. 4-Devil’s Sight. 5-Shroud of Shadow. 6-Visions of Distant Realms. 7-Mask of Many Faces.

Spells

cantrips: Eldritch Blast – Mage Hand – Minor Illusion – Prestidigitation – Ray of Frost

1-level spells: Charm person – Hex – Armor of Agathys(1/long rest) – Disguise Self(at will) – Arms of Hadar

2-level spells: Hold person – Crown of madness – Darkness(1/long rest) – Invisibility(at will)

3-level spells: hyponatic pattern – Thunder step

4-level spells: Banishment – Summon Greater Demon – Arcane Eye(at will)

5-level spells: Hold Monster – Cone of cold – Far Step – Stynaptic Static

Arcanum spells: Circle of death(6 level) – Forcecage (7 level) – Dominate Monster(8 level)

The main idea is that I’m really loving the idea and roleplay of being a warlock/cursed deal being the faceless charismatic type character and being tied to a weapon as in what the pact of the blade offers.

I prefer a ranged combat character, but I don’t want to be useless in melee. How can I optimally play this build?