Hello, sc-myralai.
Thank you for reaching out to the Community. Yes, you can use Payroll expenses in the Company Contribution: Retirement. Also, you can add another account for the company contribution as sub-account in the Payroll Expense (Parent account).
Though, I still suggest to consult with an accountant for the accuracy of your books.
Here's an article for the set up of payroll item and the retirement contributions in QuickBooks: Retirement plan deductions/ contributions.
In case you will need one, check out the links below for some QuickBooks Online video and Payroll article tutorials:
Please let me know in the comment section if you need additional help. I'm here to lend a hand. Keep safe always.