Workflow Steps skipping order

Hi guys, I am having a problem with my workflow.

the first things that happen once activated the wf is check if some conditions are true on my database and sets some custom states with yes/no and only then create a new thing (depending again on the result of of my search and custom states.

If one of my custom states is set to yes all the wf has to stop, but my problem is that the custom state set to yes because the workflow has already create the new thing before the wf get to that step.
So my custom state instead of being set to β€œno”, because at the time I set the workflow in motion the database is returning that result, the workflow skip all the steps and create the new thing, so the custom state set to β€œyes” but just because of the new thing created.

I have tried to trigger a custom event to create a new thing always if my custom state is set to β€œno” but same result. I do not understand why.

Does any of you have an idea of why that is happening?