Which is the better way to write a conditional statement? [closed]

As far as I can tell, there’s no performance difference. And both styles are acceptable by WordPress Coding Standards as you can read in:

Braces should always be used, even when they are not required:

and

Note that requiring the use of braces just means that single-statement
inline control structures are prohibited. You are free to use the
alternative syntax for control structures (e.g. if/endif,
while/endwhile)—especially in your templates where PHP code is
embedded within HTML

I always use the brace styles beucause I think is more widely known by PHP programmers of different levels and makes the block “hierarchy” much clearer and easier to understand.

Bottom line: you should choose what is more convenient to you. And whichever you choose, be consistent and stick to it.