How to Auto-Populate Related Categories on Product Type Selection in Strapi UI

I’m working on a project where I have Product, Product Type, and Category collections in Strapi. Here’s the relationship structure:

  • Product has a relation with Product Type.
  • Product Type has a relation with Category.

Goal:
When creating a new product, I would like to automatically populate the Category field in the UI based on the selected Product Type. That is, when a user selects a specific Product Type for a product, the UI should display the related categories of that product type.

I am using Strapi v4. Is there any way to achieve this