Is there any option to resume activity of failed workflow in the new workflow retried?

I have a workflow where debit was done but credit failed because of service unavailability. Activity level retry reached maximum attempts for credit service and workflow is marked as failure. We brought credit service up. We have configured workflow to retry. The new workflow is not resuming from credit service. It starts from beginning again. I mean, it debits again.
Is it the way Temporal workflow retry designed or Is there any option to resume activity of failed workflow in the new workflow?

Activity level retry reached maximum attempts for credit service and workflow is marked as failure.

Is this a business requirement to set a max attempts for retries for this activity? By default if you don’t specify activity retry options (or if you do specify it, dont set max attempts count) your activity can retry up to the set activity ScheduleToClose timeout, or if that’s not set, up to the workflow run timeout. Once activity retries are exhausted, ActivityFailure is delivered to your workflow code which you can handle and maybe start that activity again, or perform some compensation business logic. If you don’t handle ActivityFailure you workflow would fail, as I think is the case you might be running into.

We have configured workflow to retry

Workflow retries are modeled as new workflow runs with same workflow id, different run id. In case of workflow retry, it is executed from the beginning. There is also an option to reset your failed execution to a certain point of its execution in history, this can be done via tctl or via SDK api (please specify which sdk you are using if you need an example for that).
Workflow retries are not necessary in most situations, often it is better to handle activity and child workflow failures inside your workflow code than letting the workflow fail and retry from the beginning.

For retrying related activities together you also might be able to use Workflow.retry which can be useful to retry parts of your workflow code (for example the credit and debit activities) and could help avoid retrying the whole workflow. See fileprocessing sample for Java , Go that use this technique.