Thanks for posting in the Community space, @kysheryl1.
You can set up a contribution item, so it'll post to box 12. And you may need to contact our Customer Care Team, as they're the ones who'll help you in setting up the item.
To reach them, click the ? Help button at the top-right corner and select Contact Us to talk with a live agent. Ensure to review their support hours to know when agents are available.
For more details how W-2 form populates, you can check this link: Understanding W-2 Forms.
You may also consider contacting your accountant or tax advisor. They can provide more information on posting the contribution item on box 12 of the W2 form.
For future reference, you may want to run and customize payroll reports in QuickBooks Online. It will help you manage payroll taxes and keep track of employee expenses.
If you have any other QuickBooks concerns, please don't hesitate to post again here. I'd be happy to lend a hand. Have a good day ahead.