I will answer myself (maybe it will be useful to someone)
I reinstalled the program and now Samba works fine.
Why samba?
For me, Samba is much more convenient than UPnP/DLNA. I have about 6 TB of music files on four HDDs connected to the NAS server, all folders are named according to "Artist - Album Year (Format)". Many albums are available in several versions in different quality (CD, Hi-Res, DSD) and are located on different hard drives. The media library will unite them all and it will be difficult to understand where is which option. Therefore, folder navigation is preferable for me.
In addition, when playing files using the SMB protocol, the album cover is displayed (when UPnP, I do not see it).