Question about gradients

Hey, I have a question about gradients.

Sometimes when I use a gradient, it come out as an index instead of a background and I cant duplicate it and use it. If anyone has any suggestions on how to fix it, that would be great! Thanks!