I want to add reservation period to the scripts where orders will be cancelled automatically when they are not paid
In order to add a reservation period for orders, you will need to create a cron task.
In the cron task, the script should compare all the pending order's date from the current date.
Once an order is found which exceeds the reservation period you only need to change its status to canceled.
You can customize this feature yourself,
And if you want us to do it for you, then please raise a ticket: https://webkul.uvdesk.com/en/customer/create-ticket/