hi guys so my question is how can i build a robot that can follow me using my phone or anything else
Options
You have a following problem and then you have an obstacle avoidance problem. Both must be solved.
Lets look at the following part.
If you don’t mind being tagged, using a pixy is available:
https://www.robotshop.com/en/pixy-cmucam5-image-sensor-lego-version.html
There is a recent thread discussing pixy
If this is outdoors and the degree of required closeness is not that great, then you can use GPS and a compass.
Those two possibilities are reasonably off the shelf as far as the sensors go, you still have a good bit of work getting from there to the actual following. There are other options but you would be largely on your own in getting them to work.