Click the Gear icon ⚙ at the upper right corner and then Account and Settings.
Go to the Billing and subscription tab.
In the QuickBooks section, select Cancel subscription or Cancel online.
Select Continue to cancel, then select Continue to cancel again (if applicable).
Follow the next steps and click Submit and cancel subscription.
Hit Got it.
Once canceled, an email confirmation will be sent and your account will be available in read-only access for one year from the cancellation date. In case you want to resubscribe in QuickBooks Online, you can go through this article for the detailed steps: How to resubscribe or reactivate QuickBooks Online.