One of the challenges you can come across as a GM is how to make a boss character stand out mechanically or feel like a boss in a fight. There are some obvious ways to do it such as the bag of HP and high powered attacks. They're tried and true for a reason, they work, and every boss has to be able to absorb enough damage to feel like a challenge to take down while doing enough damage to feel like a threat. The thing is how does the boss do that, and how can you do it in a way so that a good round doesn't just blow up a player and take them out of the game while starting the death spiral for the encounter?
A common way to do this is to let bosses break normal rules. This can be a special, 'rule breaking' talent or ability like the 'Adversary' talent in FFG's Genisys and Star Wars systems where checks made against the boss are harder simply because they're made against the boss. There is 5e's "Legendary Actions" and "Legendary Resistances" which gives the boss options outside of their turn to act and move. There are even a ton of fan made ones. Matt Colville's "Villain Actions" is a take on Legendary Actions and one I much prefer.
Do some googling and you'll find tons of options. But how do you bring this into your game? There's a couple of things to keep in mind.
Don't Break the Rules Just to Break the Rules
Despite the temptation, don't break the rules just because. Yes, it is a Boss. Yes that should be a significant. However, that doesn't mean you just toss out the normal established rules of a game just because. In general a boss should have only one or two 'mechanics' that break the rules. For the purposes of this I consider "Legendary Actions" to be one mechanic even if you can have up to 3 or more of them over a round.
Rule Breaks Should Never Be Done On The Fly
You should not be introducing rule break mechanics on the fly. I'm not saying it will never happen, but avoid it as much as possible. Even if you don't know everything your boss can do, the way the boss can work outside normal established mechanics should be planned. Don't make up stuff just to save the boss or to give the boss another chance at killing a PC during the combat. Even if you think the boss is getting his ass kicked, the PCs might be feeling very tense over how things are playing out, and if you allow yourself to ramp things up mid combat you could tip things over from a fun but challenging encounter to an unfun party wipe before you know what has happened.
Mechanics Should Be Removed As The Fight Goes On, Not Introduced
Speaking of, as the fight goes on the Villain should have mechanics fall away, not coming into play. Yes, things like the Villain Action have the 3rd one tend to be the 'big' desperation play, but you introduce that the Villain gets a Villain Action in round 1, and in Round 4 it is gone. This doesn't mean that your Villain can't have tricks up their sleeve, but the later the fight goes the more those tricks should be ones that can be pulled off with mechanics of normal play and things already established.
The big reason for this is feel. To you, the GM, the whole fight you know the Villain has this trump card held in wait to reveal. To the PCs it can feel like just as they're about to win the GM pulls some bullshit to protect their villain.
Understand Rules Before Breaking Them
Finally, and most importantly, understand the rules before breaking them. By this I don't just mean know what the rule does, but know why the rule does that thing. If you don't understand the what, why, and how of a rule and you break it you're going to have unforseeable consequences bite you in the ass. For example, why does 5e give such a big multiplier to combat difficulty from multiple monsters? Why is 4 CR 1/4 Goblins a bigger fight than a CR 1 creature? The reason is because a lot of power in 5e comes from what is called the Action Economy. Simply put, the side with more turns has a lot more power. That is why a single boss monster in 5e can feel lackluster, getting blasted down every round while waiting for their turn and eating the focus fire of the group (hence Legendary Actions, btw! :) )
This goes for all rules by the way. If you're new to GMing, I'd consider my advice above to be rules. Things to do to stay safe. Once you understand the what and why of them though, you are going to do a much better job of breaking them in ways that adds to your game instead of detracts. You know your group. I don't. Maybe they'll love the opposite of what I suggest.