personal isolation, nobody goes out, nobody comes in, until this thing has run its course.
with most diseases if not all the disease needs a human host to inhabit, it cannot live for much longer than 24 hours outside of the body, I think the only exception is HIV, maybe Ebola.
the disease will die when there are no more living human hosts to infect.
HIV cannot last very long outside of the human body - maybe 5 or 6 days at most in dried blood if the environment is not harsh. Other diseases like Hepatitis B can last about a week. Hepatitis C can last over 3 weeks outside the body. Other diseases such as the spores from Clostridioides difficile (a diarrheal disease) can last for many months outside the body and remain viable. Remember that certain diseases can infect animals,too, and then the animals can pass them back to humans. Other pathogens normally live in the environment, and can live their entire life away from humans - but can also infect humans and cause severe disease.