Cholecystokinin, while similar in structure to Gastrin, functions differently, causing other reactions.
Gastrin is produced when the body senses
the presence of food in the stomach, or your Vagus nerve gets stimulated by one of your senses, like taste or smell, in response to food.
One or more of its hundreds of compounds triggers the production of certain hormones in your body, such as motilin-
which stimulates gut contractions- or Gastrin, which causes the secretion of acid in your stomach.