Extra attack requires the Attack action. Cantrips use the Cast a Spell action. They don't work together unless a gesture explicitly allows it, which none currently do. Unfortunately you cannot.
Can you cast a cantrip and attack with extra attack?
Fighter's "Action Surge" allows you to gain a second action, which you could use to cast a cantrip/leveled spell (but that is two actions and two castings) The New Bladesinger Classes extra attack feature allows you to cast a cantrip as one of your extra attacks, but you can't use that to cast two cantrips.
Can you use Cantrips as bonus action?
Yes. If you have a cantrip which you can cast as a bonus action, you may cast it after attacking. Sorcerers can also spend 2 sorcery points to quicken a cantrip so that it may be cast as a bonus action (if they know the Quickened Spell metamagic).