I have dji mavic

DON’T try! especially Follow Mode.
First read and understand the Online User Guide:

If you activated Follow Mode, it did NOT take off/fly away, it was positioning itself relative to you according to the Follow settings you choose.

You can stop any autonomous flight by pressing the Pause button or by switching the flight mode switch on the remote controller to either C or S (Cine or Sport), as written in the Online User Guide.

Also read this thread: