Have you thought about using something embedded in the table like Delta CDC or Iceberg CDC should could help you in retrieving only changed lines?
Otherwise, your issue sound like subquerying, have a look at incremental models in DBT which I think will match your need : https://docs.getdbt.com/docs/build/incremental-models#filtering-rows-on-an-incremental-run