Is it possible for me to add new objects in the thing that comes up when you right click in the heirarchy?

Is it possible to add new objects that you spawn in the editor with an editor script or something? If so, how would I code it? I mainly want to know because I am making some generic prefabs that would be really nice to quickly spawn via this right click menu.

You can use attributes in your C# scripts:

[CreateAssetMenu(fileName = "New Scriptable Object", menuName = "Create My Scriptable Object")]
public class MySO : ScriptableObject
{
}

or

[ContextMenuItem("Do something", "SomeFunction")]
private void SomeFunction()
{
}

You can check out more C# attributes in the Unity script reference: