If you process payroll through Direct Deposit, you can still cancel it before 5:00 p.m. and 2 banking days before the paycheck date you accidentally entered. On the other hand, if you manually processed the check, you can delete and recreate it anytime.
Here's how to delete a paycheck:
Log in to QuickBooks Online.
From the Workers or Payroll menu, select Employees.
Below the Run Payroll button, click Paycheck list.
Select the paychecks to void or delete.
Click Void or Delete.
For more details in handling and processing payroll, you can refer to these resources: