When defining trigger in a declarative pipeline, it will suffice to write
and build once.
After the first build accessing the job config UI will show the trigger configuration.
However if you do the same thing with a scripted pipeline
you need two builds to register the trigger (it won't appear in the UI and won't be working until the second manual build).