I think if the questions/answers were similar to those proposed in the idea description, users would quickly get annoyed because it would feel like a "dry" test and especially when this is necessary every time to unlock your phone. When annoyed they won't care that this is "for their own benefit", they would simply want to get rid of this function.
If instead, the correct answers were truths about their unhealthy phone use habits this would at least be something fun to do (self-irony). The trick of not turning this into just another dopamine hit when you don't care about the repercussions is to make the fact obviously sad at the same time. So instead of answering what's the correct way to behave users would be required to answer (guess) how they actually behave and then the phone would give the facts.
So first the sentence stating some known screen addiction-related fact would appear, e.g.: "Did you know that the maximum amount of time you can spend on social media per day while not being at risk of damaging your mental health is one hour?" Then the question would appear: "Do you know how much do you spend there per day on average?" and a few answer options below like 1, 3, 4, 6. Let's say the user chose 3, and the correct answer appears - "no, 6!".
Since the phone keeps track of user's activity on various apps and browsers it can make factual calculations and present them to that person. I also propose that instead of a phone unlocking function it would be an unlocking function for certain apps that the user spends the most time on. That way the unlocking act wouldn't be so annoying and the phone could present the person with facts about their digital habits that contrast the most with the healthy norms.