You can modify an order only if it has not been filled yet (i.e., it is still pending). Follow these steps:
On the Web Portal:
On the App:
However, orders cannot be modified after market close. At the end of the day, intraday positions are automatically squared off, so modifications are not possible. If your order is not executed by market close, it will expire. You’ll need to place a new order in the next trading session.