There could be several reasons why a cat might not gain weight, including the following:
Genetic factors: Some breeds of cats, such as Oriental Shorthairs and Siamese cats, are naturally slender and do not easily gain weight.
Gastrointestinal problems: Cats may have weak digestive systems, leading to incomplete digestion and absorption of food, thus failing to obtain enough nutrition for weight gain.

Parasite infection: If a cat is infected with parasites, the parasites will steal nutrients from the cat's body, leading to malnutrition and difficulty in gaining weight.
Picky eating: A cat's eating habits may lead it to only like to eat certain foods, resulting in an unbalanced intake of nutrients and an inability to gain weight.