This answer is informed by two things1:
1. The Sword Coast Adventurer's Guide (SCAG) (pages 7-70)
2. The baked-into-the-genre-tropes modeled on social-political habits in human history
The Sword Coast as a whole isn't governed as "The Sword Coast"
The region's structure (such structure as exists) is that of local centers of power with a lot of "wilderness / lawless land" in between. Where "the law" comes from is a rough approximation (as has been true in every edition of D&D) of societal models of the Feudal period and the primacy of city-based political power similar to the ancient Greek City state model (or medieval Venice), supplemented by a few extra-national organizations - like the Lord's Alliance - that resemble coalitions like the Hanseatic League of medieval times along Northern Europe's coastal frontiers.
Cities and towns: City-states with Medieval / Feudal Overtones
While further east there are Kingdoms like Cormyr, and further south there are Amn and Tethyr, the Sword Coast region is characterized by feudal / medieval / renaissance flavored urban nodes separated by long tracts of wilderness and low population density areas (towns, villages, etc). These urban centers, and local populated areas, are run by nobles, assisted by councils in some cases (Waterdeep, Neverwinter). They each are powers unto themselves: the reach of the law is limited by the reach of the local nobles' resources and their desire to enforce their will.
- Waterdeep, Neverwinter, Silverymoon, Luskan, Baldur's Gate, Daggerford, Mirabar, Longasaddle, Mithral Hall, Yartar, and Amphail are polities of various sizes mentioned in SCAG. (p. 43-66)
There is no King, and there is no Emperor. When you refer to "the law of the land" the Sword Coast doesn't have one. Each city or locale has its own modes of governance, control, and enforcement (or attempts at it). In other words, it is nothing like the world that you live in, 21st century civilization.
How is the larger area of the Sword Coast governed?
It isn't (the larger area). That's a part of the setting (SCAG, pages 7-70).
How are laws enforced & by whom?
Locally, by local authorities
How are officials appointed?
Locally. Each locale has its own method.
How are taxes levied?
You will find mentioned in the Waterdeep Dragon Heist, Murder in Baldur's Gate, and other published adventures references to taxes paid to a local authority.
Imagine the PCs join some Orc raiders and slaughter a town; who would come to enforce the law of the land?
There isn't a hard and fast answer (DM, you make the call). The options include:
Nobody would, as it's too far away and something more pressing has
the authorities in Luskan busy up to their ears (why do you think
that nobles hire adventurers in the first place?)
A local posse / armed party under the authority of a local lord
A band of adventurers / mercenaries hired by a local lord, a religious leader, or a faction
Factions: if what the adventurers / PCs did was egregious enough, their actions might attract the attention of a faction or a Faerun-wide organization like the Lord's Alliance, or the Harpers. Those organizations can put the resources together to track down the adventurers / PCs and bring them to justice.
"Someone else" with an interest in that area. (The druid who lives in that forest over there? When she lays down the law, a pack of wolves comes out of the woods and scare off (or worse) bands of brigands and such).
That is all up to the DM to put into place in a given game, or by the author in a given FR novel.
Trade connects all of the cities
As with normal human models of civilization, trade between the various regions and city-states makes for both shared interests and rivalries. Trade brings with it both prosperity and potential sources of conflict. Which leads us to ...
The role of Factions as an in-world mechanism for political intrigue
Between the Harpers, the Lord's Alliance, the Zhentarim, the Emerald Enclave, and a variety of non-state organizations (the Knights Templar in Medieval Europe make for an excellent parallel) organizations with aims and goals that are not tied to a local area act to promote their own interests in multiple areas.
The Lord's Alliance: an alliance rather than "governance"
The Sword Coast Adventurer's Guide has a description of The Lord's Alliance.
A confederation among the rulers of various northern settlements... in addition to providing military support and a forum for the peaceful airing of difference, the Alliance has always acted under the principle that communities with common cause that engage in trade are less likely to go to war with one another. By maintaining strong trade ties within the alliance as well as outside it, the Lord's Alliance helps to keep the peace. (p. 7)
As noted above, and consistent with the tropes baked into the genre and b this game since its first edition, game specific organizations similar to the Hanseatic League promote trade and "working together where there is common interest." That is as far as a "suprastate" organization of that kind can go. If the "threat" to peace and trade is large enough, the Lord's Alliance may be able to put their rivalries aside and work together to neutralize the threat.
It is worth remembering that the tropes baked into the genre - feudal / medieval forms with nobles and local nodes of power - have been an ingrained part of the game since its original edition. How that gets applied will vary by setting, will vary by location in the setting, and vary by the DM's desires to challenge the players. The Sword Coast is described as a very decentralized region in the 5e published lore: if you like, you can think of it as a re-skinned "Wild West."
1 Notes on comments before answering:
Are you interested in parallels to real world/historical forms of
governance in your answer? – KorvinStarmast
That would be fantastic. – Amethyst Wizard