To cancel your order you’ll need to do this on the Uber Eats or Just Eat app or website where you placed the order.
If you have placed a McDelivery order on the My McDonald's app then your order is passed immediately to the restaurant and so it is not possible to cancel your order.