How can I edit the existing order details ?

For example sometimes customers are cancelling 1 item from their orders, or sometimes they are returning some items that they have bought (not all).

So in that case I need to edit the orders and need auto updated inventory.

How can I do it pls ?