However, it sounds as if you are describing isolated early heart beats (as opposed to sustained fast abnormal heart beats).
Examples of this would be premature atrial
contractions (PACs) or premature ventricular contractions (PVCs). These are quite common during the second trimester in the developing heart, and usually disappear by the third trimester or soon after birth. They are also benign and don’t typically cause any problems.