https://github.com/ytisf/theZoo
Thats a repo of existing malware. Be careful with it. You can use that to start reverse engineering an existing malware. Use a VM that isnt connected to a network.
If you want to write something, go for it. Often malware is tailored to a single OS (Windows), so cross platform is less of a concern.
The hard part of writing malware is doing it in an undetectable way, which will usually require deeper OS knowledge, which you'll have to acquire over time. YouTube has some good videos if you hunt around.