2012 Buick LaCrosse‘s new engine dies

Replaced an engine on a 2012 buick lacrosse because it died at an intersection now the new engine dies and makes tapping noise

What type of warranty came with this “new” engine?
If I was in your situation, on Monday morning I would be camped-out at the door of the mechanic who installed the new engine.