I am not sure if I can design UI programmatically in Unity. In app development, I usually write UI programmatically and store key UI structures in Constant or Utils, so when I need UI to create other apps I will just copy paste the UI and adjust some area to fit the needs of the new apps.
Doing UI in Unity is like doing UI in Swift storyboard, or Ui panel on the right side of android studio, even though the Prefab can be copy paste into different projects, I still have to click different components and check the detail elements in each of them. It’s easy to miss something.
In programmatic design, all codes are placed in front of me. It’s easier to adjust layout, spacing, size, etc. from just one screen, or few screens. and no need to worry about the strange saved/resaved bugs in Unity.