A mum has shared a heartfelt story of how TikTok helped spot and diagnose her young child with a terminal illness.