If you wish to reopen a closed ticket when the customer replies, you can enable the default automation rule ‘Automatically reopen tickets when the customer responds’ under Ticket Updates automation.
You can also edit the rule to customize the rule according to your business requirement.
Admin -> Automations -> Tickets updates -> 'Automatically reopen tickets when the customer responds' -> Turn ON
Below is the screenshot of the rule configured:-