1. Go to your Chart of Accounts. In QuickBooks Online, that's Settings > Chart of accounts. In Desktop, it's Lists > Chart of Accounts.
2. Start a new account. In QBO, click New. In Desktop, right-click anywhere in the list and choose New.
3. Set the account type and detail type to match the parent. A sub account needs to share the same account type as the account it's nesting under; QuickBooks won't let you nest a sub account under a parent of a different type.
4. Check the sub-account box. In QBO, that's Is sub-account, then pick the parent from the dropdown. In Desktop, it's Subaccount of, with the same dropdown.
5. Name it and save. QuickBooks will typically display it as Parent:Sub Account in lists and reports, so it's clear at a glance where it sits in the hierarchy.