Trying to lose weight

How do I better ignore cravings for food I shouldn’t be eating like fast food and sugar. Currently trying to live healthier and lose weight but I have cravings for sweets often. I have PCOS