When people’s hearts are turned towards you, it is only by His Mercy & Grace. When their hearts are turned away from you, it is only by His Wisdom.
So when people come and go, don’t be so sad now. Have faith :)
“And rely upon Allah; and sufficient is Allah as Disposer of affairs.” - Quran 33:3