I have some pieces of code and i want to store it , so that, i can easily use it later.
You can create Code Templates.
Preferences > Text Editor > Code Templates.
Templates are extremely powerful.
You can add variables, using variablename so that is get replaced everywhere when you use the template.
You also add a shortcut to use the template quickly.
Example :
public $type$ $name$ {get; set;}
I’m not sure I understand the question, its seems too simple. The code is basically a text file and you could go as simple as copy-pasting the code block you need into notepad to save it.
You could of course, save a copy of the script .cs file into any folder you want (eg. your desktop; or C:/MyDocuments/MyScripts/ and just drag it in to each project you want in unity.
I often do paste some code straight into Notepad++ . Its a free app that has some of the features of an IDE , and loads really fast and stores all the recent documents as open, so you dont have to keep re-opening files. But you’re better off editing it within an IDE tbh.