I don't think you'd be able to add this to the checkout section unless you're on Shopify Plus. If not on Plus, you could have a widget ("tip jar") on Cart page and maybe Product pages.
From a technical standpoint, 1 approach would be to build a custom app where the user can enter the tip amount (or calculate based on %), then this would create the tip in the form of a custom product that would then be added to their cart. When they checkout, they'd see it as a line item.
If you need something like that built I can make that happen.
If your doing in person sales collecting tips is feature on Shopify POS however you can't do this out of the box for the online store.
Albeit a long standing feature request probably a just too low priority for shopify as it's not a general use case for the online space,
If you need it for the online store for sanity you need to do this on the cart page not during checkout.
Typically an addon product either using preset increments or the $0.01 cent product hack(currently the multiple will show during checkout which you can't really style without shopify plus).
So do the cart way unless your an enterprise with a good budget and time to invest and/or unless there's a third party gateway whose integration with shopify allows such a thing. I haven't seen one because how would the confirm the fee they are owed?
You can only modify the shopify checkout if your on a shopify plus plan even then there's no built in feature letting you easily add an arbitrary amount to a checkout so any implementation would need to do clunky stuff like redirects to a permacart or other silliness.
How would I know if I have Shopify plus? What would the time requirement be like to have something like this done?
Shopify Plus is the enterprise pricing plan $$$ you'd know. If you don't know your more than likely on a regular monthly plan but you can always check your account info in the admin.
Turn around time is a couple of days depending on schedules.
Implementation(coding+setup) of general strategies is like a handful of hours if even.
But it's discussing the details of what strategy to use then scheduling the time to do it varies.
Email me email@example.com with budget or for an estimate.