Sometimes I start in the db client and then copy that to the dbt model (if it’s a brand new model with no dependencies). But my usual workflow is to start with the dbt model definition in my IDE and then run
dbt compile
and run that in the db client as I work on the model.