Let's delete the expense transaction entered as a deposit by going to your register. You need to open the account where the money was deposited. Then, delete the entry from there.
My sample expense below is deposited to the Advertising Expense account.
Select Accounting from the left pane, then Chart of Accounts.
Enter the account in the Filter by name or number field, then click Run report under Action.
Filter the Report period, then click Run report.
Click the amount to open the Bank Deposit page.
Click More, then select Delete.
Once done, here's an article to help you handle expenses in QuickBooks Online: How to enter, edit, or delete expenses. This link provides instructions on how to record expenses to make sure everything is accurate.
Anything you buy with a debit card, credit card, online payment, or bank transfer is called an expense in QuickBooks. To record it, I've added a quick video tutorial below for additional guidance.
Let me know if there's anything else you need and I'd be glad to help you out.