The nirvana fallacy is the informal fallacy of comparing actual things with unrealistic, idealized alternatives. It can also refer to the tendency to assume there is a perfect solution to a particular problem. A closely related concept is the “perfect solution fallacy”.
By creating a false dichotomy that presents one option which is obviously advantageous—while at the same time being completely unrealistic—a person using the nirvana fallacy can attack any opposing idea because it is imperfect. Under this fallacy, the choice is not between real world solutions; it is, rather, a choice between one realistic achievable possibility and another unrealistic solution that could in some way be “better”.
It is also related to the appeal to purity fallacy where the person rejects all criticism on basis of it being applied to a non ideal case.
I think it’s this:
https://en.m.wikipedia.org/wiki/Nirvana_fallacy