Your question is Controller vs RestController. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
What is the difference between @Controller and @RestController?
Asked in the Technical Round 2 stage. The interviewer is checking whether you know how Spring MVC chooses between view rendering and writing the response body, and what annotation composition changes that behavior.
Keep your answer focused on Spring MVC and Spring Boot, not on unrelated web frameworks or general HTTP theory.