I think copy and pasting code is very useful for a junior developer and nothing to be ashamed of. You will learn by debugging and modifying it.
As a more senior person, I rarely do copy whole snippets. I will look for general inspiration or to confirm my idea and check if there is a better solution. I wont blatantly copy as it rarely fits into my architecture and code style so it is faster to just directly write it how I need it.