Factitious disorder is a serious mental health disorder in which a person appears sick or produces physical or mental illness. People with factitious disorder deliberately produce symptoms of an illness for the purpose of receiving care and attention in a medical setting.
https://my.clevelandclinic.org/health/diseases/9832-an-overview-of-factitious-disorders