Why Char works when varchar dont?

foo VARCHAR, bar VARCHAR(30) DEFAULT 'chilli pepper',

I dont know why this part of query doesnt work but it does accept it when i use char. I used https://www.eversql.com/sql-syntax-check-validator/ to determine error, since this query also have 2 FK that are referenced to same column (id), but im not sure that would work.

Simmilar thread but didnt answer my question