Let's go through some possible situations why this would happen.
By default, QuickBooks Online (QBO) will automatically apply the credit memo to the next invoice you create for the customer. You can disable this feature by changing the settings.
Click the Gear icon, then select Account and Settings.
Select the Advanced tab.
Look for the Automation category, then turn off the feature Automatically apply credits.
Another possible reason would be if you've previously created an invoice for the customer and marked it as paid. If the invoice got deleted, the payment for it would still be there. Same with the situation given above, the system will automatically apply the credit to this new invoice.
If in case the situation you're in isn't the same as what's provided above, I'd suggest contacting our technical support team. They can pull up your account in a secure environment, and with your permission, they can remotely access your computer to view what's the root-cause.
Meanwhile, if you need to check for undelivered invoices in QuickBooks Online, you can view the article provided. It lists the steps you need to take to check if you have any invoices created that you haven't sent out yet.
Drop me a comment below should you have any other questions. We're always here to lend a hand.