Was in Solo or PVP? Solo play means just you vs machines - the other ships are allnon-player ones. Yes, you can still get interdicted but it's not all that common (and from my own experience, very rare as a beginner, but more common as you go up in rank, and become a more tempting target as it were).
If it was another rplayer then sadly there are sad gits around who take pleasure in bullying people - this is called "griefing". It offers no gain to them except the pleasure of spoiling your day. It cannot happen in Solo mode.
The best thing to do is to try to keep on the escape vector, then you willevade the interdiction. If you do get stopped, then (if it's a nonplayer character, an NPC) they may well be satisfied with your cargo. They'll say so in the comms. You can then dump your cargo.
If they really want to blowyou up, then the best thing to do is run. A Sidewinder is very fragile, but it's also fairly fast and maneuverable.
Anacondas are massively armed and armoured and shielded. But they cannot outfly a small ship. The best thing to do is put maximum power to your engines, hit the boosters and dodge - whilst charging up your framseshift drive and then jumping out as soon as you can.
You can't outfight an Anaconda. But you can outrun it. If it's a more even match,then you can make a figh tof it. Lots of pirates will actually run themselves if you put up a good fight, espescially if you manage to bring their shields down. Also, the longer the fight, the bigger the chance the cops wil turn up.
If a squadron of federation Vipers show up they can bring even an Anaconda down, given long enough.