I'm new to WSL and got the advice to store my VScode projects on Linux for better performance.
Well, sort of. Assuming that your projects are Linux projects (using Linux-based tools in Ubuntu) and you are using the VSCode WSL Extension, then yes.
However, for projects that use Windows toolchains, it's better to keep those on the Windows drive.
I would like to keep an automatic sync between these files stored on Linux and a folder stored on Windows since I would like these projects to be stored in my OneDrive.
... I'd like to be able to use those files again if I change computer
There are multiple options to keep development projects backed up in the cloud. My first suggestion would be to use Git with a cloud repository such as Github (and many others). That way your projects aren't only backed up to the cloud, but you also get into the good development habit of committing your changes incrementally. You can also rollback to previous states, created branches when you want to try something without breaking your "working" copy, compare diffs, etc., etc., etc.
Another option, if you truly want to keep the files on both OneDrive and WSL/Ubuntu/Linux filesystems is to rsync
between the two. However, do keep in mind that you'll probably need to slightly change your automount
settings for WSL in order for this to work properly. See this question for details.
I made a symlink in Windows from the folder on Linux. Will synchronization with onedrive work correctly?
Probably not. Symlinks across filesystems are "soft", which means that they are just a "pointer" from one to the other, instead of keeping a copy of the files on both.