If you eat something raw, weigh and log it raw (vegetables, nuts, sushi, etc) and if you eat it cooked, weigh and log it cooked. If you are using an app, there is a wide selection of preparation styles to choose from for the same foods.
When I’m in doubt, I choose the highest calorie count that closely represents the food so I don’t run the risk of undercounting calories.