It's possible that you enabled the Automatically apply credits feature in QuickBooks Online (QBO). This automatically applies credits to the next invoice you create for the same customer.
If you want to disable this feature, you can refer to these steps:
Sign in to your QBO account.
Go to the Gear icon and select Account and Settings.
From the Advanced section, click on the pencil icon to edit Automation.