2005 Volkswagen Passat front thump

There’s a thumping sound from the front of the engine
when you start the car. The engine light also keeps blinking There was an oil leak which the
mechanic stated that the gasket needed to be replaced
What is the problem?

Check Engine Light Flashing? (Here’s What To Do) (mechanicbase.com)

did you replace the gasket to stop the oil leak?
if not you are probably low on oil if you have not been checking it and adding as needed. and if that is the case it probably your noise and engine light.
if you did fix the leak then we need more info. like the check engine light code. and a sound clip would also help.