If you answered no to the DS 160 question "Do you have any relative in the US?" and later in life, a relative in the US files an immigrant petition on your behalf, will the consular officer easily notice the discrepancy during an immigrant visa interview?
Firstly, cheating or being deceptive is an automatic rejection in almost all cases. If by later in life you mean "1 year ago" and the relative was a close relative, like a brother or sister - that's hard to justify why you "forgot" to mention them.
If your application was 10 years ago and the relative is some distant cousin (or you are now related legally for example you have a brother in law due to a sibling marriage), then this is not deception.
The form asks about your current status (not in the future or the past) and the declaration you sign confirms that you are giving answers truthfully as to the best of your knowledge at the time of submission.
Immigration interviews are generally quite comprehensive - chances are they are well aware of your previous travel history to/from the US - and as you have to provide passports they may also be aware of your other non-US travel history.
Only the immigration officer knows if they have access to the forms you fill when applying for visas and how back of an archive they keep, or even if such forms are reviewed during an immigration interview, so no one can answer definitively.