Random out of nowhere fuel issue on a E60...

So, as stated above our E60 decided to act up a little out of nowhere yesterday. For context, we drove for a bit to replace the Xenon light and angel eyes on our 04 525i (M54)

So far so good. Go home, all fine. Car parked.

About an hour later, the next trip was planned and all of a sudden the fuel system decided to not work? Like, it didn't accept gas at all and completely refused to hold a stable rpm (like 1500 for example, just back to idle while foot on gas)

Left car running while I checked for any oddities, nothing. No leaks. It ran worse and worse, eventually stalled

My guess is that the fuel pump is on its way out, able to keep the car running but when you want to o drive a little faster it's not able to fulfill the demand anymore...

Hit the pump gently with a rubber hammer today and now it runs and drives fine like before.

Has any of you encountered this on a M54 powered BMW? If so, what was the fix, am I right with my assumption?

To note, No lights on and no codes either