D-mannose, a type of sugar found in cranberries, can help prevent bacteria from adhering to the urinary tract walls. It can be an effective supplement for preventing and managing UTIs, but it should be used as part of a comprehensive treatment plan.