While you can sort the accounts total to ascending or descending on your Profit and Loss statement, being able to change the order of accounts is unavailable in QuickBooks Online (QBO).
Here's how to use the Sort option at the top part of your Profit and Loss report:
Go to Reports on the left menu.
Enter Profit and Loss report on the search field.
Click the Sort icon and choose either Total in ascending order or Total in descending order.
Select Run report.
You can have this article handy to know more about the available information that can be customize in QBO report: Customize Reports.
It would be nice to have this feature as an additional customization option when running reports. That said, I'd love to share this idea to our developers so they may consider this on our future product enhancements.
In the meantime, I encourage you to visit our QuickBooks Blog to be updated with the recent happenings and future developments in QBO.
If there's anything else you need or questions about QuickBooks, just let me know. I'm always up to help. Have a nice day ahead!