Conditional Column covers simple rules, but writing the M yourself opens up more. A custom column formula can test text and dates directly:
if Text.Contains([Product], "beans") then "Coffee" else "Other": M's if needs both then and else, in lowercase.
Text.EndsWith, Text.StartsWith and Text.Contains are case-sensitive: "beans" doesn't match "Beans".
Date.Year([Order Date]) and Date.Month([Order Date]) take parts of a date.
M is case-sensitive everywhere: if, then and else are lowercase, function names are written exactly (Text.Contains, not text.contains), and text goes in double quotes.