Copying something that works is not a moral failure and it is how a great deal of real programming happens. The problem is compounding: each unexplained line makes the next one harder to evaluate, and after a while you are maintaining something you never understood.
Why does it compound?
Because unfamiliar code becomes the foundation. A script built on a section you cannot reason about cannot be modified confidently, so the next change is also copied, and the proportion of the project you can actually work with shrinks.
Eventually a small change breaks something and the only available response is to ask for the whole thing to be rewritten.
What is the practical standard?
Not understanding every line perfectly, which is unrealistic. Being able to say what each line is for, roughly, and knowing which lines you could not change safely.
Knowing where your blind spots are is most of the benefit.
What is the habit that works?
Before running anything: go through it and mark the lines you could not explain to somebody else. Ask about those specifically, one at a time, in the context of the lines around them.
Marking is what makes this happen, since an intention to understand everything is abandoned within a week and a list of four lines is not.
Why ask line by line rather than for a summary?
Because a summary of the whole script tells you what it does and leaves the unfamiliar line unfamiliar. Precise questions about specific lines produce answers that stick, and they take less reading.
What is the explaining-back test?
Writing your own account of what the script does, then asking what you got wrong with an instruction not to be encouraging. It exposes exactly where your understanding is vague, which is invisible while it stays in your head.
It is uncomfortable and it is the most efficient learning available.
How do you handle a line you genuinely cannot follow?
Ask for it written the long way. Nearly every compact construction has a verbose equivalent, and seeing the same operation as four plain lines usually makes it obvious.
You can then keep whichever version you prefer, having understood both.
Is there a case for copying without understanding?
For genuinely standard boilerplate that never changes, such as the lines that set up a script, arguably yes. The distinction is whether you would ever need to modify it: configuration you will never touch is different from logic that does the work.
What is the warning sign?
Being unable to add a feature. If your response to a small change is to ask for the script to be regenerated rather than edited, the code is not yours in any useful sense, and that is the point to go back and read it properly rather than continuing.
What does the discipline buy you?
The ability to fix things. That is the whole return, and it arrives on the day something stops working, which is also the day the difference between having scripts and being able to program becomes very obvious.