A PhotoShop action can be handy, but it is severely limited. Most choices are pre-made. If any choices can be made as the action is running, they can only be made one at a time. There is no way to save choices for future use. Editing actions is an extremely cumbersome process.
PhotoShop has the ability to run scripts written in JavaScript, and those scripts can have dialog boxes in which users can make selections before the script begins applying choices to the image. The Frame With UI (user interface) script is an example. All parameters of the frame can be selected before the frame is generated. If you don't like how the frame looks, you can click "Reset Frame" to restore the image to its original appearance. Frame styles can be saved, and previosly saved styles can be loaded.
To install this script, copy the .js and .jsx files into a folder of your choice. It is not necessary to copy them into your PhotoShop scripts folder, but doing so may make it a bit easier to use the script. On my computer, that folder is C:/Program Files/Adobe/Adobe PhotoShop 2021/Presets/Scripts. I don't know what it would be on a Mac. To use the script in PhotoShop, select File | Scripts | Browse... and select the FrameWithUI.jsx file.
Detailed documentation can be found in the PDF file.