Aldehydes and ketones undergo nucleophilic addition reactions.
Formaldehyde (HCHO) has two hydrogens attached to the carbonyl carbon and no alkyl groups.
Acetaldehyde (CH$_3$CHO) has one alkyl group (+I effect) which donates electron density to the carbonyl carbon, reducing its partial positive charge.
More positive carbonyl carbon means higher electrophilicity → more reactive towards nucleophiles.
Also, the larger the alkyl group, the more steric hindrance for the attacking nucleophile.
Therefore, HCHO is more reactive than CH$_3$CHO for HCN addition.