QuickBooks Online shows the account number in the register and reports. However, you're unable to use the it to order the accounts on the Profit and Loss (P&L) report.
You can use the Sort function in the P&L report to arrange the total amount by ascending or descending order. The workaround for this is export the statement to Excel, and arrange the account order from there.
The following steps outlined below will guide you: