UI flows must capture a user's interactions so that the actions can be played back. UI flows need to be able to recognize the components of the application user interface such as buttons and fields. It is not enough to record the x and y values of a component as the window might be moved.
With UI flows, you can identify the components one by one yourself to create a series of actions but both Power Automate Desktop and Selenium IDE have recorder tools that you can use to capture an entire series of user interactions to complete a process.
After recording, you can edit these actions to remove unnecessary clicks and replace data inputs with variables passed into the UI flow. You will then have a UI flow you can run with different data values.