Studies show that a substance in cranberries may prevent bacteria from causing an infection, but research doesn’t show it’s effective if a person has an active UTI.
Source: There’s no evidence cranberry juice can treat a UTI, but it could help prevent one