“Bastard” is the correct term for a child born out of wedlock. Also “illegitimate” would work.
(One reason I never got pregnant before I got married ... I didn’t want my child to be stigmatized for my bad behavior. No responsible parent would, IMHO.)
My brother called to verify with me that being conceived out of wedlock did not count, only being born.