Passing multiple values in fields as mentioned in another field (as number of values) by user I want a field that upon getting a value in a text field (eg. 1, 2 anything) shows respective fields.
If user inputs 5, then five fields will appear (similar to multiple values of a field, unlimited)

How can I make this possible?
There is a conditional module that provides UI for state API but is that enough for the working?
You can ref Examples for Developers Module. The module comes with various sub-modules for developers to start with.

Similar kind of functionality is already provided as an example in "AJAX Example" module in Examples module. i.e. User has been given a dropdown field with predefined numbers to render those many fields. Check screenshot below:


Hope this helps.