Hi Pranjali,
You can easily achieve this using data source microflows. You can set the data source of the second dropdown to microflow and add logic to return a list based on the value selected from the first dropdown.
Note: if nothing is selected in the first one, return all the values.
Regards,
Sharad R K