When you open your case your screen goes automatic on and when you close it then it should go off. But I changed my cover and doesn't work anymore. Think it's the case but not sure.... who can help?
With those cases there's not a lot you can test other than putting on a case that used to work. If it's not a first-party case, the magnets might be misaligned or not powerful enough (or too powerful that it will interfere with some functions).