Are we a democracy or a republic? Well, the question is wrong and meant to confuse you.
There are 3 main types of political systems, not mutually exclusive as there tends to be overlap depending on the country:
Democratic
Direct Democracy, Representative Democracy (Republic Government, Parliamentary Government), Constitutional monarchy
Non-Democratic
Authoritarian, Totalitarian, Oligarchy, Technocracy, Theocracy, Dictatorship, Absolute monarchy
Other Types
What form of government is the United States?
The United States is a federal republic, a presidential republic, a constitutional republic, a liberal democracy, and a representative democracy. A Republic is a type of Democracy.
So the question posed above is simply splitting hairs. But is American democracy failing? Yes, in some ways it is. We are now considered a "flawed democracy" (by the Economist Intelligence Unit). Why? The US has been on a slide towards authoritarianism for decades, especially since Trump, and experiencing the erosion of democratic principles like participation in voting, civil liberties, and overall functioning of the government. A flawed democracy is a country where elections are free and fair, and basic civil liberties are honored, but have issues like voter suppression, gerrymandering, media freedom infringement, media for clicks, social media and disinformation, low participation in politics, suppression of opposition and critics, and teetering government functioning. No wonder the right likes to say, "We are a republic not a democracy!" Their goal is to suppress voters and honest media and have an authoritarian style government with total power and control over the people.
Check out this Democracy Index which has an interactive map of the world and shows countries that are democracies or not.
Some important definitions:
Confederation (1781-1789): A confederation (also known as a confederacy or league) is a union of sovereign states, united for purposes of common action often in relation to other states. Usually created by a treaty, confederations of states are usually established for dealing with critical issues, such as defense, foreign relations, internal trade or currency, with the general government being required to provide support for all its members. Confederation represents a main form of inter-governmental-ism, this being defined as "any form of interaction between states which takes place on the basis of sovereign independence or government." Confederation is almost as a federation with the federal government being as a combination or alliance of all the states.
Federation: A federation (also known as a federal state) is a political entity characterized by a union of partially self-governing states or regions under a central (federal) government. In a federation, the self-governing status of the component states, as well as the division of power between them and the central government, is typically constitutionally entrenched and may not be altered by a unilateral decision of either party, the states or the federal political body. Alternatively, federation is a form of government in which sovereign power is formally divided between a central authority and a number of constituent regions so that each region retains some degree of control over its internal affairs.
Democracy: Democracy, meaning "rule of the people", is a system of government in which the citizens exercise power directly or elect representatives from among themselves to form a governing body, such as a parliament. Democracy is sometimes referred to as "rule of the majority". Democracy is a system of processing conflicts in which outcomes depend on what participants do, but no single force controls what occurs and its outcomes. This does include citizens being able to vote for different laws and leaders. The United States as a whole is NOT a direct democracy but at the local level we use direct democracy to vote on local issues without representation.
Liberal democracy: A form of government in which representative democracy operates under the principles of liberalism. It is characterized by fair, free, and competitive elections between multiple distinct political parties, a separation of powers into different branches of government, the rule of law in everyday life as part of an open society, and the protection of human rights and civil liberties for all persons. To define the system in practice, liberal democracies often draw upon a constitution, either formally written or uncodified, to delineate the powers of government and enshrine the social contract. After a period of sustained expansion throughout the 20th century, liberal democracy became the predominant political system in the world. A liberal democracy may take various constitutional forms: it may be a republic, such as Estonia, Ireland, Germany, and Greece; or a constitutional monarchy, such as the United Kingdom, Japan or Spain. It may have a presidential system (such as Chile, the Dominican Republic, or the United States), a semi-presidential system (such as Cape Verde, France, or Portugal), a parliamentary system (such as Australia, Germany, Italy, Slovenia, India or New Zealand) or directorial system (such as Switzerland).
Representative democracy: Wherein the people or citizens of a country elect representatives to create and implement public policy in place of direct participation by the people.
Republic: A republic (Latin: res publica) is a form of government in which the country is considered a "public matter", not the private concern or property of the rulers. The primary positions of power within a republic are not inherited, but are attained through elections expressing the consent of the governed. Such leadership positions are therefore expected to fairly represent the citizen body. It is a form of government under which the head of state is not a monarch. In American English, the definition of a republic can also refer specifically to a government in which elected individuals represent the citizen body, also known as a representative democracy (a democratic republic) and exercise power according to the rule of law (a constitutional republic).
Constitutional republic: Republics where the government's powers are limited by law or a formal constitution (an official document establishing the exact powers and restrictions of a nation and its government), and in which the leaders are chosen by a vote amongst the populace. Typically, laws cannot be passed which violate said constitution, unless the constitution itself is altered by law. This theoretically serves to protect minority groups from being subjected to the tyranny of the majority, or mob rule. Examples include India, South Africa, United States, etc.
Federal republic: Republics that are a federation of states or provinces, where there is a national (federal) law encompassing the nation as a whole but where each state or province is free to legislate and enforce its own laws and affairs so long as they do not conflict with federal law. Examples include Argentina, Austria, Brazil, Germany, India, Mexico, Russia, Switzerland, United States and Nigeria.
Presidential republic: Republics with an elected head of state, where the head of state is also the head of the government. Examples include the United States, Mexico, Brazil, Nigeria and Indonesia.
Capitalism: A system in which the means of production (machines, tools, factories, etc.) are owned by private individuals, workers then negotiate with those individuals to use those means of production in exchange for a portion of what they produce, usually in the form of capital (money). The owners of the means of production are entitled to whatever portion of the products of the workers' labor that is agreed upon by the two parties.
Republicanism: A system in which the laws and governmental policies of the state are considered a "public matter" and decided by the citizens of the society, whoever they may be. Most modern nation-states are examples of republics, but other examples include those of ancient Rome and Athens.
Socialism: A system in which workers, democratically and/or socially own the means of production.[56] The economic framework may be decentralized and self-managed in autonomous economic units, as in libertarian systems, or centrally planned, as in authoritarian systems.[57] Public services such as healthcare and education would be commonly, collectively, and/or state owned.