By means next to or near to a particular object or someone.
"Mary stood by her husband till the very end of the trial."
Bye is a colloquial word for goodbye which means to say farewell to someone.
"Bye! See you later."
Buy means to obtain something in exchange for money or goods like a purchase transaction.
"I'm going to buy my father something nice for his retirement."