@RedDeerGuy1 Yu ask two different questions here. Yes, food cravings are controlled by the body. No, they are not necessarily based on what vitamins and minerals are needed.
As @LostInParadise pointed out, some things like fat, sugar, and salt can be craved if one goes without them when one is used to them.
Some mineral deficiencies can cause a craving for foods rich in that mineral. I had a teacher who had become anemic to the point of hospitalization. He suddenly found himself asking for liver at every meal.