Smb only works after logging through SSH

Sounds like a firewall or networking issue. Do the OSMC device (Pi, Vero, …?) and the Windows 10 machine get told their IP, DNS, and gateway by a DHCP?

Did you specify a host name or an IP in /etc/fstab? Or do you do use userland-based mounting?

If you’re unsure about answering, please upload a log.