The issue with templates they could handle only simple cases or very specific complex static queries. Simple ones are a way easier with ORM/query builder. Highly depends from ORM though.
And a big NO-NO for me templates force you to repeat the same SQL in many slightly different queries. SQL composability is not a thing with templates.