Updating an existing record when a new row is created on another table

There is a lot wrong here. I’m guessing AI configured most or all of this?