Peace be upon you. The permissibility or prohibition of gelatin depends on the materials used in its preparation. If the gelatin is plant-based, it is halal. However, if it is animal-based, it is haram if it comes from parts of an animal whose meat is forbidden or from the skin of an animal that is permissible to eat but was not slaughtered according to Islamic law. If it is produced from the bones of an animal that is permissible to eat and was slaughtered according to Islamic law, it is halal. If the animal was not slaughtered according to Islamic law but its bones have been purified, it is also halal. In any case, if it is not known whether the gelatin used is halal or haram, there is no issue in consuming it.
Source: [Official Website](
https://www.leader.ir/ar/content/23812/%D8%A7%D9%84%D8%AC%D9%84%D8%A7%D8%AA%D9%8A%D9%86)
According to Ayatollah Sistani, it is permissible to consume gelatin if there is doubt about whether it is derived from animal or plant sources. However, if it is known to be derived from an animal, it is not permissible to consume it unless it is confirmed that the animal was slaughtered in accordance with Islamic law, even if it is derived from its bones, as a precaution. If it is known that a transformation has occurred in its original materials during the chemical manufacturing process, it is permissible to consume it, but this is not definitively established.
Source: [Official Website](
https://www.sistani.com/arabic/qa/21250/)
May you be successful in all good.