Considering this scenario which option is the best in terms of performance?
A CTE = "Common Table Expression" is just a different, better readable way to write queries; it as absolutly no effect on query performance. https://learn.microsoft.com/de-de/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver16