so I've read and heard from a lot of different places that Justinians Corpus Juris Civilis is the framework how modern law operates. I also read in a book, that it was by far his most important accomplishment. But after reading excerpts of some modern translations it seems that he mostly managed to make homosexuality and swearing illegal.
Sorry if the question is dumb, but after tons of searching I can't find a good answer, to why it was so monumental.
The question is not dumb, the modern influence of Corpus Juris Civilis is constantly declared without reflection. You're right to mention 'frameworks', but not of law, but instead of processes.
Corpus Juris Civilis was effectively a failure in its own time, it was not adopted in any broad sense by Romans (in the east at that point). It may have been too ambitious for its own good, and so bits and pieces made it into Byzantium, but mostly it sat on shelves gathering dust.
In the late 11th century in the north of Italy the Corpus was 'rediscovered' by a new class of intellectuals: jurists. They were based first in Bologna (as far as we know). We don't actually know how the Corpus was rediscovered - it seems recovered in fragments, and we can only speculate as to why. The why is a massive post on its own, but suffice it to say that we see at this time the rapid institutionalization of the formal, hierarchical organization and power structure of the medieval church, with Pope as declared to have power over all, bishops' power being effectively curtailed and brought into line and subject to the Papacy. Alongside these developments the Papacy institutes an ability for any Christian to appeal to the Papacy on any matter of conflict or disagreement at level of the bishopric; and this is no trivial matter as church courts had jurisdiction at this time over many things we would now consider entirely secular matters: marriage, divorce, separation, sexual moral issues, murder, theft, and to a great degree property disagreements- remember that at this time the medieval Church controlled at least 30% of arable European landmass. By the turn of the 13th century courts had been established in every bishopric and the Papal offices were overflowing with matters on appeal that needed adjudication.
The 12th century development of the Church legal system (which destroyed among other things trials by ordeal) was based on the codexes of Canon Law developed famously by jurists like Gratian. It's important to note here that Canon Law and civil law were not separable in the middle ages, or even in part of the early modern period. Canon and secular jurists studied in the same schools, and discussed common matters in what was termed the ius commune (that is, 'common law' as in the sense of shared law, not 'Common Law' of England and thence its colonies).
So, why am I boring you with this?
Because the rediscovery of Corpus Juris Civilis had virtually nothing to do with the content of the law, and everything to do with a. how to think about law (natural law) and b. court processes.
I will leave aside the former (about natural law) because it bears in no way on modern law since the 19th century. Natural law had dominated jurisprudence and legal argument from the 12th century, but it was effectively jettisoned in favour of positivist law.
What is important is court process. In the early 12th century the papacy asked one of Gratian's colleagues at Bologna to draft a document which outlined processes to be used within Church courts. Before this, the Church had nothing but habits and customs- they weren't scalable. It was chiefly the processes in Corpus Juris Civilis that the Bolognese jurists turned to as models, and at this point we see introduced an old Roman legal juridical method which is still used today: the inquisition.
When we hear the word inquisition, we think of the horrors of persecution of heresy. But the inquisitorial process is the Roman method of juridical investigation. Unlike the UK, USA, Canada, inter alia, which are accusatorial courts with a judge as referee between appellants, the inquisitorial system is one lead by justices who investigate matters before the court: they interview the witnesses, they establish the proceedings, and lawyers more or less represent their clients in the matter. Justice systems today which lay claim to Corpus Juris Civilis lay claim only to inheritance of processes, and this much is true: a justice from a 13th century continental civil or church court would mostly recognize the processes in a modern court in France, Germany, Italy, Spain, Poland, etc, and in a lot of other countries around the world besides which have inherited this 'Roman' system of justice. In France, in Italy, you will still see the word inquisition or questio.
Two last points:
the content of modern law owes much of nothing to Justinian except as cultural mores and customs have passed down and been deemed worthy of acceptance. Laws for or against homosexuality or anything else have no relationship to Romans; if the words of Romans were used by medieval jurists it was only because they found them convenient in reflecting their own thinking, customs and mores.
The structure of the modern law, of a 'code', is often referred to as an inheritance of Justinian's code. This is only true in the most broad, most abstract notion of a code. The Corpus Juris Civilis bears no real structural relationship to modern civil codes. Modern Civil Codes were developed in the late 18th-early 19th centuries as nation-states domesticated their laws and codified them through elected parliaments, senates, etc. Before this, law in western Europe was a local, common law rife with contradictions. Neither Justinian nor medieval jurists, nor even most jurists of the 18th century would recognize what is today called modern Civil Code.
A final point, the above is about continental Europe and and those states which have taking up a Civil Code. The countries which have inherited the Common Law of the UK are even further away from Corpus Juris Civilis. Most medieval jurists would not recognize the processes of a modern American court room.
To build upon /u/idjet's point, modern American law owes its form and substance to England's common law system, full stop (almost). In constructing the American courts, founders and early jurists consistently referred to William Blackstone's Commentaries on the Laws of England, a widely influential restatement of common law principles that were broadly in use but rarely set down, let alone in encyclopedic form. You can almost trace the development of American jurisprudence by measuring the decline in citations to Blackstone (and other treaties), and the corresponding increase in citations to the court's own precedent. Contract law, tort law, the rules of evidence, and broad criminal law concepts all stemmed at some point from principles set down by Blackstone.
Our continuing debt to English case law is most notable in modern equity jurisprudence: that is, cases construing a court's ability to direct non-financial, non-statutory remedies in civil cases: i.e., injunctions, specific performance in contract cases, trusts, etc. American equity formally "forked" from England with the Judiciary Act of 1789 (see a case where Justice Scalia explains why that matters). Pre-1789 British equity jurisprudence continues to be relevant today in exceptional cases; post-1789 jurisprudence is not, and replaced by state common law or federal statute.
Just to echo the other commenter again, this is actually a very good question!