Hi there Ramonde,
It's important that all your transactions are entered correctly so that your books are well-balanced. QuickBooks Online is a great tool able to help you keep track of sales tax on transactions so you know the amount to file. I can provide some information about taxes.
If a transaction is deleted, modified or deleted from an already filed tax period, there will be an exception in the current tax period accounting for the change in the previous period. You can see some information about exceptions in this article.
To know if deleting the prior transaction would be the best course, or if there would be a better method to erase this in your books, I recommend speaking to your accountant. Their expertise will be able to tell you if there's another method that you should be using to erase this duplicate transaction in this current period. You can invite your accountant to your QuickBooks account by going to the My Accountant tab. You can also find an accounting professional near you that has experience using QuickBooks by clicking on the Find a pro to help option to help you in this section.
If you have any further questions, please feel free to ask them here.