It's great to have you here in the Community, hayley-collins-t.
You can pull up and customize the P&L report to show certain account codes. Here's how:
- Click Reports in the left panel and search for Profit and Loss.

- Select Customise.

- Go to the Filter section and select Distribution Account.
- From the drop-down, select all the account codes you need to show in the report.
- Hit Run report.

In case you need to automate a custom report, you can go through the following articles below. On the same link, you'll find steps on how to save its current customisation settings to serve as your record and helps you quickly access it for future use.
Customise reports in QuickBooks Online.
Memorise reports in QuickBooks Online.
Let me know if you need anything else. I'm always here to keep helping. Have a great day, hayley-collins-t!