Hi,
You can restrict vendor creation without affecting customer creation in Odoo by following these steps:
1. Go to Settings and enable Developer Mode.
2. Create a new group in Settings > Users & Companies > Groups > New. Add all the users to whom you want to give create access, and select all the access rights for that group.
3. Create a new record rule in Settings > Technical > Record Rules under the Security section with the configuration below:

Domain filter: Ensure to include the group ID (116 in this example) that we created earlier.
4. Now, only the users in the newly created group can create a vendor.
5. After these configurations, non-access members may still be able to create a vendor (who are typically not vendors) as a contact in the Product template purchase tab. To prevent this, restrict the "Create" and "Create/Edit" permissions for all users using the Studio application.
Click Studio icon from the product template page and click on purchase tab and select Edit list view.

After that click "Vendor" on the list view and check the highlighted checkboxes on the left side of the screen and save the changes.

Hope this helps.
Thanks.