In the scriptures we read of certain people whom God punished with disease.
Gehazi, servant to Elisha
2 Kings 5:27 The leprosy therefore of Naaman shall cleave unto thee, and unto thy seed for ever. And he went out from his presence a leper as white as snow.
2 Chronicles 26:19 Then Uzziah was wroth, and had a censer in his hand to burn incense: and while he was wroth with the priests, the leprosy even rose up in his forehead before the priests in the house of the LORD, from beside the incense altar. 21 And Uzziah the king was a leper unto the day of his death, and dwelt in a several house, being a leper; for he was cut off from the house of the LORD:
Acts 12:23 And immediately the angel of the Lord smote him, because he gave not God the glory: and he was eaten of worms, and gave up the ghost.
On occasion God punished Israel with plagues.
Illness is thought by many to be punishment in this life for sin.
This is not true. The above are special cases.
Although God permits disease, God does not generally directly cause diseases in ordinary people as a punishment for sin.
The punishment for each and every sin is death, not disease in this life.
Ezekiel 18:20 The soul that sinneth, it shall die.
Romans 6:23 For the wages of sin is death;
For those who believe and obey the gospel preached by Jesus and his apostles, any disease contracted serves as a test of faith. It is certainly not to be seen as punishment from God.
The apostle Paul suffered from what he described as ‘a thorn in the flesh’
2 Corinthians 12:8 For this thing I besought the Lord thrice, that it might depart from me. And he said unto me, My grace is sufficient for thee: for my strength is made perfect in weakness.
Most of us, even if we reach old age, will die of one disease or another, but God isn’t to be blamed.
There are some sins (particularly sexual) which put one at risk of disease.
I hope you find this helpful.