Only Admin should have the privilege for customisation
By default in ERPNext if the admin can customize the doctype, else no one else can. You have to test with different user, I think you didn’t test. So test first and see later.
Explain fully what your scenario requires. Because you have created this same topic before. So explain in detail, then we will be able to give you a proper answer, else you will be confused.
I have solved it by deleting permission for customize doctype andd added a new role and given that customization for that role and given it to the admin so now adin only have the role to customise
In simple word, Users with system manager rights will be able to customize, others will not be able to customize.