How much DM buy-in do you have for your idea?
Within the 5e rules, a druid's wild shape has the following limitation:
You can’t cast spells, and your ability to speak or take any action that requires hands is limited to the capabilities of your beast form.
The hard limit "you can't cast spells" means that, RAW, your hamster won't be able to do her druid / necromancy thing. However, you are already conceiving of a character that is breaking RAW, in that you want "to have my character stay shapeshifted into a hamster". Normally a druid's 'shapeshifting' (the game actually calls it wild shape) lasts only a few hours (at the level you would come in, three hours). So, what you are asking for is 24-hour wild shape (1), with spell-casting capability.
Since this is clearly not RAW, your DM's decision (if they are even willing to consider it) will likely hinge on the power balance of your character vs. how much it enhances the overall story (you have a unique and interesting backstory). This is, I think, in your favor. At your level (since the wild shape cannot yet include creatures that fly), a typical druid uses their wild shape for a good combat form, becoming an Ape or a Crocodile (or if a Circle of the Moon druid, a Giant Constrictor Snake or Sabre Toothed Tiger). As I DM, I would put a hard no on anyone who said 'my druid concept is to remain permanently in the best combat shape and I want to be able to cast spells' (2). But you are not asking for that. What you are saying is 'I want to be able to permanently remain in a shape that is no help at all in combat (and is actually even worse a typical druid's gnome form), a shape that is of no help to the party in carrying or manipulating things, but at least I can cast spells.' What you are asking for is actually lower-powered than a RAW gnome druid, so if your DM is open to homebrew character concepts, I don't see any reason to reject it prima facie.
How big is a sprig?
Let's suppose you have DM buy-in to remove the hard limit of "you can't cast spells" from your wild shape, and now you have the soft limit of:
your ability to speak or take any action that requires hands is limited to the capabilities of your beast form.
So, even if your DM allows you to cast druid and wizard spells as a hamster, the question becomes how you will be able to use the components that allow you to cast spells.
Verbal
This is not strictly about whether hamsters can speak, per se but about whether the natural limitations of their form allow them to make 'sounds of power' (and see this question and this question).
Here RAW are actually in your favor. In 5e, a creature's language ability is part of its Stat Block, and regular hamsters do not have a defined stat block (even though awakened hamsters and miniature giant space hamsters have been described to some extent). Because there is no official stat block for common hamsters, your DM must create one, and they are free to give such hamsters the vocal range such that their chirps and squeaks can create the sounds of power necessary for the Verbal component of spells.
Somatic
Somatic gestures are by definition performed with your hands (3). You would need your DM to agree that your little hamster paws can count as hands when performing somatic gestures.
Material
It will be pretty inconvenient for your hamster to carry around the specific material components you need for each spell, so you will want to replace them with spell foci; both a druidic focus and, if you are multi-classing to wizard, an arcane focus. Of the druidic foci you will want a 'sprig of mistletoe'; since this item does not have a weight, it is easy to imagine that this is a single leaf for you which your carry in your cute little hamster paws or, when you you need both paws free to move, you stuff into your cheek pouch. An arcane focus is a bit harder, since according to RAW the smallest arcane foci are wands and crystals which weigh a pound each. Your best bet here is to hope your DM agrees that the foci size should be proportional to your body weight, and that you can have a tiny crystal which fits into both your paw and your cheek pouch.
Can we talk about necromancy?
Now I know your question directly says that you want your druid hamster to have learned necromancy spells, but you also say that you have "just started" D&D, so you might not know what all is implied by 'necromancy'. You say your character wanted to learn necromancy "to try and revive AT LEAST her sister". What's not clear to me is whether your character concept is of someone who started out with the intention of saving her sister from death, turned to necromancy, later realized that bringing her sister back that way was impossible, then sank into despair and nihilism and is now a typical dark magic Necromancer, eager to build an undead army and exact revenge for your sister's death OR whether your character is still questing a means to save her sister, and along the way wants to protect others from a similar fate. If your character is the first kind, I think the other answers to this question about how to have this well-covered. The rest of my answer will assume that your character is the second kind.
The School of Necromancy explores the cosmic forces of life, death, and undeath. As you focus your studies in this tradition, you learn to manipulate the energy that animates all living things. As you progress, you learn to sap the life force from a creature as your magic destroys its body, transforming that vital energy into magical power you can manipulate.
Necromancy as a school in 5e is not about returning your loved ones from beyond the grave, but more about enslaving malign spirits to your will and draining the vital force of living creatures. The first school-specific ability you gain (at 2nd level) is called "Grim Harvest" and gives you "the ability to reap life energy from creatures you kill with your spells" while the second (at 6th level) is called "Undead Thralls".
If this is not what you have in mind for your character, be aware that in 5e you do not have to be a necromancer to use necromantic spells. Any wizard can learn: false life (1st) and gentle repose (2nd), even though these are Necromantic Spells. As a wizard of another school, it will be slightly more expensive (in time and money) to learn them, but that is the only effective limit.
However, note that raise dead (5th), and resurrection (7th) are not on the Wizard spell list, so very early in your arcane studies you would realize that they are not a clear path to returning your sister unless and until you ultimately attain the Wish spell, which would let you cast resurrection through its ability to "duplicate any other spell of 8th level or lower".
If you did decide to multiclass from druid to wizard, based on your backstory, I would suggest that your character would become an Abjurer:
The School of Abjuration emphasizes magic that blocks, banishes, or protects...You understand...that ending harmful effects, protecting the weak, and banishing evil influences is anything but a philosophical void. It is a proud and respected vocation.
I would say that your character's inability to protect her sister has led her to obsess about protecting others. She protects her party members in dangerous situations, and she sought out her party as one that protects the weak and helpless in the world, all with the end goal for her of attaining the power to bring her sister back to life. As an Abjurer, she would have full access to all of the necromantic spells listed above. In addition, she would have the Abjuration school ability to make an Arcane Ward that protects her from damage, and at 6th level she would gain the ability to use this Ward to protect others. That seems to fit your concept better than a Necromancer who is "reaping life energy" from others.
Thus, my first suggestion to you would be to start off as a Druid 2 / Abjurer 4 (or 5). This is the minimum Druid level she would need to have obtained wild shape before the death of your sister; after her death, she has now reached the point where she can cast gentle repose.
Not only wizards use Necromancy
Even though Necromancers are wizards who have specialized in the Necromancy school, spells that are necromantic are available to more than just the wizard class (there are many necromantic spells available to druids, as the other answers point out). Your druid should realize that bringing her sister back through the arcane arts will be a monumental achievement, since she would need to learn Wish, the most powerful spell a wizard can cast. There are other ways...
My second suggestion is for you to consider multiclassing to Cleric, and selecting the Grave Domain (and thus starting play as a Druid 2 / Grave Cleric 4 (or 5). Narratively, you might still worship the forces of nature that you did as a druid, but turn especially to whatever gods or forces of death you knew before as you focused particularly on mortality. Clerics of the Grave:
respect the dead and pay them due homage. [They] seek to put restless spirits to rest, destroy the undead wherever they find them, and ease the suffering of dying creatures. Their magic also allows them to stave off a creature’s death, though they refuse to use such magic to extend a creature’s lifespan beyond its mortal limits.
As a Cleric, your character would have access to spare the dying (cantrip), false life (1st), gentle repose (2nd), revivify (3rd), death ward (4th), raise dead (5th), and resurrection (7th), with the ultimate goal of learning resurrection to return her sister to life. Many of these would be her Domain spells, meaning she would always have them prepared. All but one of these spells are necromantic, but you don't have to be a necromancer or even a wizard to learn them.
But also consider a single-class Druid
Another possibility would be to remain a single-classed druid of 6th level (or 7th). It might fit your character's backstory to believe that her sister, having died but being content with that fate, cannot be brought back from the dead - but that your character seeks to contact her spirit, which is now happily in another realm (for example the Golden Hills or the Beastlands). In this case, your druid might focus on a spell progression which emphasizes communion with natural spirits, trying to learn from them where her sister's spirit is, building to the point when she can travel to the realm where her sister's spirit resides so as to ultimately speak with her as long as is necessary for her to resolve the effects of her death for herself. That is, her story is not so much about saving / recovering her sister as it is about recovering from her own trauma, accepting death as part of the natural cycle, receiving forgiveness, becoming psychically 'unstuck', and being able to move on (and perhaps through doing so, finally being able to leave hamster shape). In this case, my third and final suggestion is that you play as a single-classed Circle of the Shepherd druid, since they:
commune with the spirits of nature, especially the spirits of beasts and the fey, and call to those spirits for aid. These druids recognize that all living things play a role in the natural world, yet they focus on protecting animals and fey creatures that have difficulty defending themselves.
The spirit totems summoned by your Shepherd Druid would be powerful aids to her companions, who themselves adventure to defend those that, like her sister, cannot defend themselves. In particular, your druid's Unicorn Spirit combined with her healing spells would allow her as a hamster to be of great help to her comrades. If you follow this path, your spell progression would be something like:
Druidcraft (cantrip), Healing word* (1st), healing spirit (2nd), conjure animals and summon fey (3rd), conjure woodland being (4th), reincarnate (5th), conjure fey (6th), and plane shift (7th).
By the time your druid attains plane shift she might at least know 'where' her sister's spirit is, and she would presumably use the spell to go to the plane the spirit was on and then look for her sister until they were able to reunite and work through their loss together.
One benefit of this approach is that you would get to take the full six or seven levels of spell-casting ability in a single class, meaning that you would start with spells of at least third level and possibly fourth. Since your hamster is going to be interacting with the world largely as a caster, that would make her likely more powerful at the outset than if she multiclassed to wizard or cleric and thus a more fully-contributing member of the party.
In addition, another ability of the Shepherd Druids is Speech of the Woods:
At 2nd level, you gain the ability to converse with beasts and many fey. You learn to speak, read, and write Sylvan. In addition, beasts can understand your speech, and you gain the ability to decipher their noises and motions. Most beasts lack the intelligence to convey or understand sophisticated concepts, but a friendly beast could relay what it has seen or heard in the recent past. This ability doesn’t grant you any special friendship with beasts, though you can combine this ability with gifts to curry favor with them as you would with any nonplayer character.
While perhaps fitting your backstory, this also gives you the ability to occasionally have social interactions with NPCs, since your DM will likely rule that as a hamster, you are not able to speak in a way that most NPCs, or even your own party members, can understand. Even if you do not select this druid circle, though, you might still have access to the similar ability Speak with Small Beasts:
Through sound and gestures, you may communicate simple ideas with Small or smaller beasts.
You might receive Speak with Small Beasts if the gnome sub-race you selected was Forest Gnome, and I would recommend you do so if you decide to go the Druid/Abjurer or Druid/Grave Cleric route instead.
(1) If I was your DM, I would say that you initially became a hamster to comfort your sister as she lay dying, but that the trauma of witnessing her death has psychologically frozen you in the state of her favored animal and that you will be unable to resume your gnome form or use your wild shape until you have resolved that trauma by either bringing her back or letting her go.
(2) As Someone_Evil notes, the ability to cast spells while in wild shape form is not attained in RAW until 18th level. While there are a number of reasons for this, I suspect that one of them is that for Moon Circle druids, peak combat wild shape is reached at 16th level which gives access to beasts of CR8, such that beyond this level, one of the few ways to increase power is to allow spell-casting capability while in wild shape.
(3) Don't worry that 'somatic' actually means 'performed by the body' and this should actually be called a manual component; the phrases 'somatic gestures' and 'somatic components' are used idiosyncratically in the game and have a long history in D&D.