Leprosy is mentioned in the Bible, about 30 times, about as frequently as murder, adultery and coveting. Leper is found about 20 times (with some overlap with leprosy). There are people living today with the disease of leprosy.
I found some sources dealing with the topic of leprosy in the Bible. These include Matthew Henry's commentary on Leviticus 13, which is public domain, Robert Jamieson's commentary on the same chapter, also public domain, and John Calvin's commentary on that chapter, also public domain. See also the Wikipedia article on leprosy. The disease is carried by bacteria. Jamieson and Calvin didn't know that, and supposed that it was caused by other means. Henry believed that leprosy was not an infectious disease, but solely the result of sin. "That it was a plague inflicted immediately by the hand of God, and came
not from natural causes, as other diseases; and therefore must be
managed according to a divine law."
Calvin wrote that "I confess that I am not a physician, so as to discuss [leprous diseases] accurately,
and I purposely abstain from close inquiry about them, because I am
persuaded that the disease here treated of affected the Israelites in an
extraordinary manner, which we are now unacquainted with; for what do
we now know of a leprous house?"
There seem to have been two different types, or causes, of leprosy. One of these was miraculous affliction. Miriam (Numbers 12) was miraculously stricken with a skin disorder by God when she and Aaron rebelled against Moses. This didn't last more than a few days. Gehazi persuaded Naaman to give him some gifts, ostensibly for Elisha, who didn't want them, but Gehazi took them for himself, and Elisha called for God to make Gehazi a leper. (2 Kings 5). Miriam was healed with no mention of prayer or other intervention by Moses. King Uzziah was stricken when he took the priest's duties upon himself (2 Chronicles 26). Uzziah was isolated as a leper for the rest of his life. Gehazi was apparently cured somehow, as 2 Kings 8 mentions him as talking to the king, with no mention of his having leprosy.
All three of these cases seem to have appeared instantaneously.This source states that Biblical leprosy was not the same thing as leprosy that exists today. The three cases mentioned above do not seem to have been the same as other cases of leprosy mentioned in the Bible, for example in Leviticus 13.
Some writers have claimed that the Israelites weren't victims of leprosy until they contacted it in Egypt.
The other type of leprosy would have been by an infection.
Can God strike someone with a disease (say, cancer, or some sort of heart disease) instantaneously, by a miraculous decree? Yes, certainly. Does He do so now? Perhaps. If God did this in 2022, most likely it would be as a punishment. (However, Job's disease, which God allowed, was not a punishment.) It could be a sudden, God-induced bacterial infection, or some other condition which resembles leprosy.
Do we abhor people who are "not normal," and avoid interactions with them? (Such as Down's syndrome people, muscular dystrophy people, those with Tourette's syndrome, people with diminished mental capacity and others, even the aged?) Unfortunately, most of us, including me, tend to act that way. Jesus didn't act that way, and we shouldn't.
What about a leprous house? (Leviticus 13:34-35.) It's in the Bible. It's my guess that God spoke in a manner understood by the people of Bible times, without putting what He said in 22nd century terms. Genesis 1 speaks of a firmament. People of Bible times seem to have believed that there was a solid, transparent sphere somewhere above the solid earth. There wasn't. But God accommodated their beliefs. See here for my post on this. A house could have been infested with mildew or some other fungus, but the ancient Israelites might well have believed that this was a case of leprosy, and God accommodated their beliefs, in the presentation of Leviticus.
As far as I know, God doesn't send leprosy, cancer, or psoriasis to people as punishment today. (Although bad habits, such as smoking, over-eating, and not getting enough exercise bring about punishment, of a sort.) But this doesn't mean that God condones sin. Sin is terrible. It is a form of rebellion against God, which God doesn't tolerate, so He paid the penalty for sin Himself.
Thanks for reading!