Hi Menagapriya, this is not possible with the default cancel button because this one contains generic rollback and close page functionality.
If you're able to create a microflow, you can easily do this with a microflow by using the "rollback" or "change" action for a specific object.
Make sure you refresh the object, otherwise you won't see the changes.