Copyrights advise

Hi everyone,
How are you? I hope you are doing well. I am trying to get started with coming and I see that my coding isn`t too hot, and most of the time I am able to find someone who already done something like my talk but someone has done it better. What is the general rule of thumb when it comes to coping things.
Thanks in advance