static_assert requires an integer constant expression (not to be confused with const) as parameter. So the issue is what C regards as a an integer constant expression. It's rather picky with this (C23 6.6):
An integer constant expression shall have integer type and shall only have operands that are integer constants, named and compound literal constants of integer type, character constants, sizeof expressions whose results are integer constants, alignof expressions, and floating, named, or compound literal constants of arithmetic type that are the immediate operands of casts.
String literals isn't among any of these, hence the error.
However, the standard allows implementation-defined (meaning compiler-specific) forms on constant expressions, why for example some compilers like clang might accept the code. But code relying on that is not portable.
Similarly, C++ is more lenient to various forms of constant expressions than C, so if you happen to compile the code as C++ by accident, that would work too.
char[N], asconstwas not available until later.constor not does not make the object constant as in the error message.static_assert("aaa"[0] != 'a', "some string here");.