Summary
Although it’s really easy to work real-world laws intoDungeons & Dragons, such as breaking and entering, grave robbing, and murder, it’s much more fun to experiment with laws that would really only apply to a fantasy world. Some may parallel real-world laws, but their punishments would be far harsher than their real-world counterpart simply because there is more at risk.
You are dealing with magic and the terrifying potential that it holds in the wrong hands - keeping it regulated and under control is important to the health and safety of the nation and its people. Plus, dubious (and good laws) are a great route to a jailbreak arc.

9Higher Evil Magic
Yes, Necromancy Is On The List
No, you should not go out of your way to do every single necromantic spell ever because it violates the natural laws of the world. It only makes sense that, unless otherwise cleared by a higher authority, these magics wouldn’t be legal.
You really shouldn’t have the average person - or even the average adventurer - learning how to resuscitate the dead or casting spells that can end a person with nothing more than a single word. Necromancy is hardly the only higher evil magic, and there are some “good” necromantic spells (such as False Life), but on a whole? It’s not looking so great for the necromancers.

8Lesser Evil Magic
There is some magic that seems perfectly innocuous but, in reality, is quite damning,violating free will, intentionally deceiving, or being utilized for malicious purposes. Spells like Charm Person, Disguise Self, and Invisibility, although not causing physical harm, are rarely used with good intentions.
Charm Person intentionally violates someone’s free will,controlling their mind and their thoughts like a monster(even if it’s not necessarily total domination). Disguise Self and Invisibility are both oriented toward deceit and stealth, likely heavily utilized among rouges and thieves.

It’s only just that these spells and ones like them are highly regulated and largely illegal for the common populace. Perhaps it’s something that you could get a license to use, but they’ll be putting a lot of faith into your moral compass.
7Utilizing Destructive Magic In City Boundaries
You Are Liable For Property Damage
To put it simply, your party should know better than to utilize destructive magic while within city bounds. There are, of course, exceptions, such as if the city is under siege or there’s a dragon or something of the sort.
But most days, nothing terrible will happen, and having yourwizard cast something like a fireball (or something equally cool)isn’t going to turn out well for the average person. That kind of spell is simply overkill and will cause more harm than good, especially when you’re in such a closely crowded environment.

Paying not only for damages caused but also a little bit of time imprisoned might give your wizard time to think about what they’ve done and, hopefully, stop future incidents.
6Failure To Control Magical Beasts
They’re Your Responsibility
Yes, your party should probably be responsible for any damage or bodily harm that your magical beast causes. Even if it’s not bodily harm, there’s a chance they could still mess with someone mentally, and it’s not like you can hold a magical animal liable for that.
As such, the responsibility falls to the owners. Failure to control a registered magical beast, depending on how much damage was caused, could result in a minor fine to heavy restitution, alongside having the magical creature taken from your party’s care.

5Failure To Register Magical Beasts
Be A Responsible Owner
Force your party to be responsible pet owners and take some charge - register your magical beast and make sure they’re up to date on their shots. Failure to do so may result in your party having their magical beast taken away and put into the city’s care until they have properly registered and proven that they can be responsible.
Magical beasts are no joke - it’s not like an unmagical dog or fish. These creatures hold the potential to do a lot of damage, and they can be downright terrifying at times, which means your party needs to be responsible for them.

4Poaching Of Magically Vital Species
Leave The Unicorns and Pegasi Alone
In magical environments, there needs to be balance, because magic is, fundamentally, energy. Just as overhunting or poaching specific creatures in real life can unbalance an ecosystem, the same could happen in a fantasy world. Only the results would be far more disastrous, possibly extending far beyond the ecosystem in question.
Creatures that are fundamentally magic, such as unicorns, pegasi, elementals, or even dragons, are important for the maintenance of the world’s magic. Hunting them down without a bounty on their heads or a license issued by your party’s local guild should hold dire consequences.

In the inverse, there might be quests posted on job boards asking for an adventuring party to hunt down a magical beast because it’s negatively interfering with the balance of nature.
3Blasphemy And Heresy
The Gods Are Real And They Didn’t Like That
If the gods are real in your fantasy world, as tends to be common, then you should consider the fact that blasphemy and heresy likely have very real consequences. The laws are less in place to protect the gods from mean words or actions and more to protect your party and the other citizens from retribution.
To disrespect or spit in the face of a god could mean disastrous results, so perhaps, while this is a crime to appease the god, the punishment is less jail time and more so “protective services” time, at least until things have simmered down a bit.

2Adventuring Without License
Guess You Better Register With A Guild
Look, adventuring is a risky business, so it’s best to keep track of everyone who delves into the profession. Not to mention, it helps regulations to stay enforced and stay meaningful.
If everyone could adventure without a license, it would be absolute chaos for people doing whatever they pleased! Plus, if you have a license, you are pretty much guaranteed work at some point, right?

The guild has contracts, and it’s up to you to pick up the contracts you think you are adept enough to handle. Of course, if you don’t have a license, there has to be some sort of fine - perhaps even jail time, depending on how long the group has been active.
Even still, you probably shouldn’t put too heavy of a price on this - perhaps give them a set period to register with a guild and obtain their license before they have to pay a significant fine.
1Failure To Report Loot
What, You Didn’t Think The City Would Tax It?
Whether it’s gathered from dungeons or from monsters, knowing what magical loot people possess is a really good thing. It helps the economy from being unbalanced and it helps government officials know just what kind of magical items are out there in circulation.
You don’t want things that are too dangerous to end up in the hands of ordinary folk, after all. It would be like giving a nuke to a baby - unimaginably dangerous and just waiting for disaster.
Failure to report loot could result in having your adventurers be liberated of said loot, or possibly even resulting in their adventuring license being suspended.Just make sure it’s still fun for your partyand isn’t too punishing.