Can you clarify what you mean by reusing the condition? You could place steps which depend on the same if logic in their own pipeline file and only upload that pipeline if the condition is true, in which case you would not need to apply that logic to any of the steps inside that pipeline.
I am thinking the same solution, but also want to know if there is any way else without a new yaml file.
If this is the only way to go, I am happy to use this.
If the conditional check you are doing is based on branch and builds are triggered through webhook then you can define conditional at pipeline level as explained in this doc
However if you want conditional check at step level then you can combine the command steps as shown below if that works for you and use the condition check
Other option is to use Yaml anchors so that you do not need to define the check in every step and use yaml anchors to populate it for which ever step you want that.