A narcissist doesn’t want to compete with any other friends for the loyalty they demand from you. That’s why they will constantly trash-talk any mutual friends you have. They simply don’t want you giving your attention and adoration to anyone other than them.
You’ll also see them positively enjoying the mistakes and failures of other people while downplaying any good fortune those same people might have had. They have no loyalty, they see failure as evidence of inferiority, and they want you to see them as superior (and let them know you see them that way).
If your friend gossips all the time, you should realize that they are probably doing the same thing to you behind your back. It also indicates they might be a narcissist.