In modern versions of MySQL (8.4+) you just need to wrap it in parentheses:
CREATE TABLE FOO (
id CHAR(36) PRIMARY KEY DEFAULT (UUID())
);
See also knowledge base on UUID:
https://dev.mysql.com/blog-archive/storing-uuid-values-in-mysql-tables/