A mythos that gets romantisied that drawing from memory is how a master artist draws. It's not, its a specific skill that you can specilize in, but not the norm.
To draw from memory or imagination, Learn Construction and Deconstruction/Form and Structure, Observation, perspective, Visual Library, Memory recall, creativity
See my webpages for tips to train Learn Construction and Deconstruction/Form and Structure, Observation, perspective.
To train your memory recall, start a drawing Journal. Everyday draw the most memoriable thing from that day. Another training method is to redraw from memory what you just drew from refrence.
To train creativity, quick itertative draw thumb nail or sketches on a single idea. Brain storm ideas, no drawing. Observe real life and ask yourself, what you could make it into or use in. Play with what you can do. Expermiment and look back to make note on what works and didn't.
Draw alot using Construction and Deconstruction/Form and Structure, and your visual library will expand. If you don't use your parts of your visual library, the memory may go domant or forgotten. And you will need to review the subject matter from refrence first.