A formula field’s value can be used in another field’s condition even when that formula field is conditionally hidden, provided the formula result is available to the form. See how conditions behave when their source field is hidden.
Related
You can use a formula field in a condition without adding it to the form outline. This is different from adding the field and hiding it with conditions. Either way, the formula needs a result before the condition can use it. For a new record, use Save & Continue if Airtable needs to save the draft before it can calculate the result.