This question is a double-edged sword because you can and you can't. There is no dedicated melee button in The Ascent, so you cannot just hit a button and melee attack. You do not unlock one as you progress through the story. All you have is your two guns, and tactical equip but this is where augments come into play.
You can acquire augments in the game that allow you to melee attack. The very first augment you receive is called Hydraulic Slam, which can be found early on in the game or purchased from an NPC vendor called Grafter. Until you equip this augment, you cannot do any melee attack in any shape or form.
Related: Can you sprint in The Ascent?
Hydraulic Slam will cost you energy to use and be on a cooldown once used, meaning you cannot use it again until the cooldown is over. You can place this augment in one of two slots in your loadout, but if you remove this augment, your ability to melee is now gone.
As you progress further into the game, you'll find new augments that will easily replace your Hydraulic Slam. But this is entirely based on your playstyle. If you are an up-close and personal fighter wielding shotguns, then a melee augment like Hydraulic Slam will benefit you greatly. Or, if you are a long range fighter, enemies who get close to you can be knocked back or even killed by Hydraulic Slam.
Check out some of ProGameGuides other articles on The Ascent!