Create an ad set in facebook ads with info extracted from an app

I want to create an ad set and an ad within it with certain data that I will extract from a form each time it is filled in my app.

The detail is that I don’t get the way to “create” an ad set with its ad, only to “edit” the set and its ad.

This does not favor me much since it depends on one of the data of the filled form that I must use is an age range, then depending on the age range, I must use a segmentation in the ad set (including the age range filled in the form), plus a specific image in the ad depending also on the age range.

What can you recommend for my automation? Which way should I try? Do I create many ad sets and edit each one from the automation? In that case, how can I change the ad image? With AD Creative?

I will read your advice. Thank you!