Can I use samples to make my own song?

Can I use samples to make my own song? Am I violating copyright?

As i know in free library and bought sound royalty free. Can use in your production

Creating music with samples from Amped Studio Library is royalty free. Then most of sound packs in the amarketplace are licensed, it is royalty free if you’ve officially purchased the product.