There’s no difference between 877 and vanity numbers other than the way they look. The functionality of these numbers is the same.
A vanity number is a series of numbers that spells out a word or a sequence of numbers. 877 area code phone numbers are toll-free phone numbers that begin with the 877 prefix.