yes its recommended if one has witnessed a cardiac arrest and before chest compressions are started if the chest is thumped hard it has been shown to to restart the heart beat
When I was first taught CPR in the 80s I was taught to thump the chest first, but that was dropped in the 90s. I think Doctors are still told to do it.