Supervisor gave my PhD project to another student
If this was really the way you were treated - by which I mean that you have to be sure not to misinterpret statements or promises of your supervisor - then you should run.

A PhD requires trust between the supervisor and the student. After such a breach of trust, you need to find a new supervisor.