The google search says that raw cowpeas contain 21g protein / 100g. But cooked cowpeas contain only 7g/100g. Does cooking reduce protein content? or cooking made cowpeas gain water weight, and hence 100g contains only 7g protein?
its just the water weight 100g rice is around 300ish kcal but 100g boiled rice is 140 more less, so ur technically eating only 45 to 55g of raw rice when u compare it raw vs boiled (dont get the numbers too serious its just example) so if you want to get those 21g of protein from the cowpeas then measure them raw and cook them that way, and if u buy them already cooked like canned or smth then eat 300g of them so it comes to 21g of protein the same as 100g raw
One way to test this could be to weigh some cowpeas, cook them, and then weigh them again. If the weight is ~3x the original weight then it’d be likely there’s no protein reduction. If it’s much less than 3x it could be a combo of reduction of protein and water weight. This of course assumes the beans you cook take on as much water weight as those cooked for however they went about determining these numbers.
If you want to figure stuff like this out yourself, just compare to total calories rather than total weight. If the ratio of protein to calories has not changed, then it’s the same.
As a general rule, though, you won’t be losing protein by cooking.