As far as I know, we cannot programmatically insert conditional formulas in list/library forms.
We recommend that you set it in the UI interface.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.