In QuickBooks Online, we're unable to permanently delete an account regardless if it has transactions or not. We can only make them inactive. These are the steps to follow:
From the Accounting tab, select Chart of Accounts.
Locate the account you want to delete and click on the arrow down beside View Register.
Select Make inactive, then Yes to confirm.
Instead of deleting an account, you can also edit it if you'd like to create a new one. From the View register drop-down, click Edit to change the type and name of it. You can also read this article for a better understanding about the chart of accounts in QuickBooks.