The Custom fields function for customer transactions (invoice, estimate, credit memo, sales receipt, and refund receipt) is available in QuickBooks Online Essentials and Plus. Here's how to turn it on:
You can also edit the sales forms from the Custom Form Style page to add the custom fields. Here's a link for reference: Customise your Invoices, Quotes, and Sales Receipts.
Meanwhile, the purchase order function and its associated custom fields are only available in QuickBooks Online Plus.
If you're not using any of the mentioned versions, I'd recommend upgrading your plan.
I'll be right here if you have more questions about the custom fields.