You have two options here:
1. If the credit note created by mistake cancels the invoice completely (for the entire amount), the documents will balance each other out for accounting purposes. If the invoice should not have been canceled, you can simply issue a new invoice to the customer for the same amount. The old invoice and the incorrect credit note will then cancel each other out and the new invoice will have the status open.
2. Continue the invoice a second time as a credit note and put a minus in front of the amounts ("minus credit note"). The original (accidentally created) credit note is then again offset by the minus amounts of the minus credit note, so that there is still an open receivable from the customer in the amount of the original invoice.