What are the differences between the two substances?

Good evening everyone, Every now and then, videos about the drug fentanyl appear on YouTube. My sister recently had surgery and was given the drug fentanyl before the anesthesia. Now I'm wondering if there are any differences between the drug and, more importantly, what are they, because otherwise they wouldn't be allowed to administer it?…