Assalamu alaykum,
when somebody is ill and another one jokingly says to him: "Don't become ill" or "Don't be ill" as if the sick one himself had the ability to not be/become ill, is this considered shirk or kufr, because only Allah can heal and protect from illness? Jazakumullahu khayran.
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The statements you mentioned in the question are neither considered Shirk (polytheism) nor Kufr (disbelief). Rather, what you are experiencing is Waswasah (satanic whisperings).
Therefore, We advise you to disregard such whisperings and refrain from giving them any consideration.
When you say to a person, “Do not become ill,” it actually means do not expose yourself to the causes of illness, and take precautions to avoid getting ill, and seek treatment; then, as long as there are no Sharee‘ah violations involved in this.
Allah Knows best.
You can search for fatwa through many choices