Which autonomous community are you in? Because the penalties vary quite a bit depending on where you live, and that matters for me to give you a more accurate answer.
That said, yes, technically you're in a legal gray area. If you're selling regularly on Instagram without being registered as self-employed or as a business, you're breaking tax obligations (not declaring income) and possibly consumer protection regulations. The fines can range from hundreds to thousands of euros depending on the region and how long you've been doing it. Most likely it starts with an inspection, a warning, and an order to regularize your situation; but if it turns out you've been operating for months without declaring anything, the penalties can be more serious.
What I'd recommend is that you talk to a tax advisor or an accounting firm - many offer free initial consultations - to see if it makes sense for you to register as self-employed. The process isn't complicated and you save yourself headaches. If the amounts you're moving are small, there might be more streamlined options to regularize, but that depends on your specific situation. Either way, it's better to sort it out yourself now than to wait for someone to knock on your door.