The heartbeat not very accurate cos it regulate/changes when the bb grows. My gynae can see from ultrasound at around 16 weeks to see the gender (but not confirmed type). However the most early is doing NIPT which I know the gender at week 12
If its a boy, can be v obvious from ultrasound scan at 16 weeks already.
16 weeks for blood test can tell already.