Is there any third party software to enable SMB 2 or 3 on XP?
In theory it might be possible to run Samba (the Linux SMB server) via Cygwin and turn XP into a SMB2 server, but I suspect it will be really annoying to do so; the last version of Cygwin that ran on XP didn't have a Samba package and I'm not sure whether it even provides the necessary capabilities.
I haven't seen of any other projects that would make that possible.
Or is there any other way to transfer files between a Windows XP and a Windows 7 / 10 PC?
SFTP is always an option – you can find several SSH servers and SSH/SFTP clients for Windows XP (and of course for later versions).
For example, you could install Bitvise WinSSHd on the Windows XP system to turn it into an SFTP server (I think the latest version is still XP-compatible), then have the other PCs access its files through any SFTP client you want (WinSCP; PuTTY's pscp.exe/psftp.exe; FileZilla…)
Doing it the other way around (with XP being a client that pushes files to various Win7/10 servers) is also possible – Win10 even has a built-in OpenSSH server – but is slightly more work, and in general not a good plan security-wise to have an "insecure" machine keep a collection of credentials to all of your "secure" machines.
There are also plenty of "traditional FTP" servers that can run on both WinXP and Win7/10; some of them even support FTPS for data encryption (e.g. FileZilla Server).
A third option is HTTP; there exist a few HTTP servers for Windows (including Apache httpd, as well as several "small" file servers such as HFS). This is generally download-only, although with a WebDAV-compatible server it could handle uploads.