Want to hide the schema from other users

I am using open source metabase and have multiple users and schema. I only want the owner to have access to their schema and want to restrict access from other users. How can i do it on open source?

Depends upon your database. If you can create a separate 'database' in Metabase for each schema, you can then apply security at the database level.
If your DB doesn't support that, you can set security at the table level.
For both of those, you'll need separate questions/dashboards per user.
From experience, it's easier to just have a metabase instance per user.

and use the API for automating the permissions