@user1493494961
I would follow the advice of the health professionals.
I'd almost always agree with this but I find the advice OP has been given by her doctors very strange.
Until 1 a baby's main source of nutrition is milk. Even when you start weaning, as PP's have said, it's tiny amounts, and is more about tastes, familiarisation with texture & developmental - socialisation, engaging around food, gripping a spoon.
If a baby is not growing when feeding successfully, I'd need a lot more detail before just accepting I needed to wean. At 4 mo, they'll only be able for tiny amounts. The usual food tried eg puréed veg or fruit will give them almost nothing, nutritionally.
When a baby reaches 1, they're a lot more mobile, and have reached a stage, where calorifically, they'll benefit from appropriate amounts of carbs, proteins etc.
OP, can you give us any more info on what your medical team have said? I'm sure they didn't just say 'wean' & that's it, as a 4 mo would need a carefully planned diet, especially if growth / weight was an issue.