I recommend driving on an irregular path to provoke the pounding and when you hear it gently step on the brake pedal, if the noise decreases or disappears it is because it comes from the brake system, in that case you must check the antivibrators of the brake pads in case they are lazy and/or readjust and lubricate (if necessary) the jaws or calipers.