Menu planning is deciding what you are going to cook. [deciding on the topic of your articles, the chapters of your book...]
Making the grocery list. This is looking at the menu and figuring out what you need to buy. [making a list of the materials you will need for the paper]
Shopping. Going to the store or stores and buying what is on your list. [Research!].
Mise en place. Having everything in place before you start cooking. [organizing your research materials; knowing where to find them when you are writing.]
Cooking. Preparing the actual meal. [writing the article or chapter.]
Plating. Putting the food on the plates in an aesthetically pleasing manner. [preparing the final version of the article].
Now it is possible to do these steps in different order, to go to the store without having a list or a menu, for example. It is possible to start cooking and then realize you don't have some ingredients. Then you turn off the stove and go back to the store. You might have no mise en place in place. But, in general, this is the logical order of doing things. If you are writing before you do research, then what you are writing will be more of a menu plan or a grocery list than an article based on what you already know. That is fine, you should have a list, but you should know that that is what you are doing. It makes no sense to do these steps in a different order. Shopping is research and cooking is writing. The student Z had who had not read the primary text should simply be slapped down.
One caveat: my own process is a good deal more fluid than that. The metaphor suggests a straightforward efficient way of doing things, but we know in practice that research is not always efficient, that it answers to a higher efficiency.
PS: Plagiarism is cross contamination, like getting raw chicken juice into the ingredients for a raw salad.