Dinamic questions

Greetings everyone. I have a situation where the answer will define (scale) the number of subsequent questions. Example: I need to know how many people live in the household, and with the answer, I will dynamically question the ages of each person. How would you implement this scenario?
Thanks in advance

Welcome to the community, @henrydeferran! This post discussed previously should help you solve your issue: