International law generally assumes that sovereign states have relationships and treaties. That's the concept of Westphalian Sovereignty, named after the negotiations to end the 30 years' war. In recent times, various actors have pushed for limits to this sovereignty in the name of universal principles, notably the Responsibility to Protect.
How these two interact is still very much in flux.
Traditional international law recognizes that states do have the right to take extremely drastic steps to fight epidemics, not just keeping people out but also keeping people in. How an international treaty signed by a state interacts with the domestic law of that state is usually up to the courts of that state to decide.
International courts like the ECHR get jurisdiction when a sovereign country voluntarily submits to their judgement.
International courts which override this sovereignty are quite unusual, and usually involve the UN Security Council for authorization.