Task run based on value return from Previous Task

I have a requirement as below like an ETL flow

Task1 --> Task2–> Task3

Task1 Is the Audit check , which checks the DB for the status in the table if the job is running or not.
If it is running then return the status and Task2 should not run.
If the job is not running then insert into the table and return the run_id to Task2 … Task2 and Task3 should use the same run_id

Task1 should be Operator as this will be used by many jobs as first tasks

How can I achieve this

XComs are designed to pass messages from one task to another. These should be used to pass small bits of metadata like you suggested. Not full datasets. https://airflow.apache.org/concepts.html?highlight=xcom#xcoms

Additionally, you may want to consider using a branch operator to handle some of this logic.