Supabase contains a ton of extra schemas, roles and extensions that prevents restoring a local db from a supabase db. There are some tools out there but thery're all tedious to use. Here's how you can do it with a single pg_dump command
pg_dump --exclude-schema graphql --exclude-schema auth --exclude-schema graphql_public \
--exclude-schema pgsodium --exclude-schema pgbouncer --exclude-schema storage \
--exclude-schema realtime --exclude-schema vault --exclude-extension pgsodium \
--exclude-extension pg_graphql --exclude-extension supabase_vault \