Any way possible to execute 'on page load' in an order , sort of serialization?

Hi all ,
My problem : there is a page which has a custom state , on every page load this state is being populated with some values , now the problem is i have many ‘on page load’ and need to apply some conditions on ‘on page load’ based on this custom state . But the ‘on page load’ that sets this custom state runs after the ‘on page load’ on which i want to use condition based on this custom state , due to this ‘on page load’ that uses condition is empty always and i cant use the custome state’s value in condition (as the value is set at later ‘on page load’)

is there any way possible that I can serialize the ‘on page load’ or i can run in a predefined order ?

any help is appreciated.

Try using a conditional trigger with condition ‘custom state is not empty’

I tried this , but problem remains the same , the conditional trigger also have no order i.e the ‘on page load’ run before the custom trigger could set that state.