The European Court of Human Rights has next to nothing to do with the EU.
It is an international organization operating under The Council of Europe, which again, has little to do with the EU.
The Council of Europe predates the EU and is closer to the UN in its manner of operation. It does not make binding laws.
It has 46 member states (the EU has 27) including countries such as Albania, Armenia, Turkey, and Ukraine. Russia was expelled in 2022.
What can be confusing however is that The Council of Europe uses the same flag as the EU.