I'm not sure if i should fail the class or drop it and get a W

I just found out that I will be failing the class and I have the option to drop it and get a W . I am really worried that this W will affect me . This will be my FIRST W and I am a freshman in community college. But I’m not sure if I should stay in the class and get an F or get a W . My goal is to transfer to UC Irvine but I don’t want my chances to be ruined because of this W . Please give me advice I am really stressed out

Take the withdrawal. An F is much, much worse.

Even if I get a D ?