@mihail2040 Ideally, SharePoint does not support metadata (custom columns) for folders (default content type) in document library.
When you add any custom column in library, it gets added to "document" content type automatically. Hence you have to add value in custom column for all files.
So, you have to create a custom content type for folders in your library and use it instead of SharePoint default folder content type. Then you can add specific metadata (column) for the custom content type.
Check this article for more information: 4 ways to tag folders with metadata in SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.