Thanks for visiting the Community today. It's my pleasure to help ensure the payment post to the correct invoice.
First off, you'll need to open the misposted invoice, then follow the steps below to unlink the payment. Here's how:
In the Invoice window, select the clickable link (1 payment made $) under the Payment Status.
Click the date to open the Receive Payment window.
Deselect the box for the invoice under the Outstanding Transactions section.
From there, you can also select the correct invoice to link the payment for the same customer.
Select Save and close.
After unlinking the payment, the misposted invoice will now back to Open status, and mark the correct invoice as Paid.
Should the payment is intended for a different customer, you'll need to delete the payment so it won't be recorded as a credit memo for the incorrect customer. You can refer to this resource to guide you more: Void or delete transactions in QuickBooks Online.