Progressive disclosure on multi-selection interaction

I have a screen where the user can select between 3 options. These are multi-selectable. However, each option has specific settings (minimum 3, maximum 8) for it. How should this be displayed?

I feel like modals could solve this but I'm unsure if modals are good in general. Are there any other patterns for such cases?

Is adding them one below the other a good idea? input fields .

These are for an RBAC UI. X,Y,Z can be thought of different features that a user can choose to have access to. However, this pattern will be used for more than just choosing b/w features.
There are many other fields that need to be disclosed progressively. Eg, If a user chooses their country as United States, their form for the rest of the configuration will be different from the form had they chosen say, India. And in some cases, they might be able to choose both US and India, in which case, forms for both need to be displayed. What I'm confused about is how to handle all these progressive disclosures in a consistent pattern. Also, this is for a Desktop only UI.