That is very much an It depends question.
If you write a query where you store an intermediate result in a temp table, that comes with over to materialise the result. If you instead make that into a CTE, SQL Server may find a way to recast the computation order for a lot more efficient query plan. You should keep in mind that the CTE is a logical construct.
But it can just as well be the other way round. That intermediate temp table has statistics, and this can help the optimizer to make a better job with the rest of the query.
When I write queries, I tend to start out using a CTE, but if I find performance is bad, I may try to break up the query with an intermediate temp table.