I would like others to explain social classes in a space opera like Star Wars setting to me
You should probably look at a united human government through a "Federal Lens" as well. In both Star Wars and Star Trek, the space government unites different planets both of human majority and human minority populations. This has the net effect that the two governments are "Federal" and have a collective set of laws, benefits, and duties to citizenship and membership but each individual planet has their own respective laws that are made at the planetary government level. In real life, the United States is an example of this where the Federal Government is limited to laws that transcend state borders, whether it is interstate or international. Intrastate matters of law are retained by the state, and in certain cases, the Federal Laws explicitly defer to States to settle the matter. For example, states by and large do not have any say on who can cross their borders... but the states have very broad powers in establish how they pick their own leadership, so long as it's a republic government (i.e. No Monarchs) and does not prevent voters based on race, sex, or age above 18. Additionally if the crime does not involve someone crossing a border, the Federal Government lets the state handle the matter.
In Star Trek, we see something similar to a hybrid of the U.S. and E.U. federalism, as member worlds do have similar governments which tend to representative democracy, a single military service but planetary "guard" services (U.S.) but individual planets have foreign relations with non-member states (the Klingons have an ambassador to Vulcan and the Federation, which Vulcan is a member of which is more reflective the U.N. while the U.S. will have an Ambassador, but the state of California does not (Many nations have diplomatic missions in San Francisco, but that's more of an embassy's regional office and the fact that the U.S. is so large, a person on the west coast will have an easier time getting to San Francisco than it would to Washington D.C.).
Star Wars has a government that is more a mix of German Parliamentarianism and U.N. and other byzantine issues. The most notable example is that the Galactic Republic does not have a universal system of selecting it's Senator(s). Some planets directly elect them while other indirectly elect them (they are appointed by the head of the planetary government who is directly elected... or an oligarch) and still others are appointed by the Absolute Monarch of the planet, which also creates issues because those planets aren't truly represented as appointed senators will toe the line of the people who appoint them. To say nothing of representation of large companies within the member body. This lead to the Galactic Senates accusation of being ineffective and the reputation of senators as largely disconnected from their constituents, especially from those that live on worlds not geographically close to the capital (the latter is a real world phenomena. In the U.S., congressmen and women tend to get the accusation of becoming a "Beltway Insider" who is out of touch with the people of the far from D.C. Interestingly, this is a fault of the size of the nation. The capitals of both the Galactic Republic and the U.S. were located in a location that was convenient for access for all points of the nation. But as the nation expanded, they became disproportionally distant from the the edges of the nation (The Galactic Republic capital is in a crossroads of hyper-space lane routes that meant the galactic core could reach it easily from anywhere... but as it expanded to the outer edges of the galaxy this became a lot harder to do for those out there. In the United States, D.C. was the dead center of the nation when it was created and was about equal in distance to the northern edges of the original 13 states as it was to the southern edge of them. In the modern nation, it's still in a relative center on the north-south extent of the nation... but the east-west middle point has greatly expanded... to the point where Hawai'i, one of the western most states, has one of the worst election turnouts in the nation during Presidential Election years (which usually has a higher turnout in the rest of the country) because the winner of the election can often before the afternoon commute in the Aloha state has even begun (most people vote after work).)
The TR;DR of this is that economics isn't the only factor. You also have geographic classes, especially in nations that are large. To take the U.S. again, there are stereotypes of residents of every state (Floridians are weird, You're not a Texan until you own five guns, New Yorkers are rude, and nobody cares about the Upstate, Californians are superficial, Washingtonians don't have a word for "dry", Idahoans state bird, state animal, and state flower is the Potato, ect.). You can see this in some works like "Star Wars" and "Star Trek" in that certain species or planets get reputations for certain things and tend to keep that reputation among the fans. Vulcans have a reputation for being extremely logical scientists (despite at least one prominently featured member being essentially a cop) and the Ferengi were nothing but greedy capitalists (despite two of the three most featured members of the species flat out admitting they are terrible business men, though one of them understands the fundamental principle of Supply and Demand very well.).
In Star Wars, the Gungans are all annoying klutzes, despite only one member of the entire species being portrayed this way... and he was banished from Gungan society for all the trouble he caused, and the Hutts are a race of Mafia Dons (frequently portrayed as such, though they tend to get subverted as well. In the Old Republic MMO, one Hutt character is an excitable scientist who provides you with all your technological assets for your stories. And in the books, one of the best Chancellors the Republic ever had was a Hutt who was known for his personal integrity and lack of political corruption.
Many of these are brought about by common species philosophers or the planet's situation (Tattoone for example, tends to have a cosmopolitan collection of people come, but its a desert planet, which hampers travel over vast deserts meaning communities are slow to develop. Coruscant, the capital world of the Republic, is portrayed as all the good and bad parts about a major city. Towering skyscrapers with fantastic architecture, but also a large "inner city blight" with high crime rates and poor underclass. Both also have clear signs of middle class (with cantinas, pubs, and eateries where people can sit down and talk, as well as sports bars and entertainment venues. But a middle class moisture farmer could afford a multi-story dwelling and a large plot of land on Taatooine, he'd likely be struggling to make ends meet in Middle Class housing on Coruscant because the rent for an apartment in a densely populated urban environment is too damn high for a much smaller amount of interior space. In one episode of clone wars, the protaganists visit a non-force sensitive worker at the Jedi temple who lives in an rundown apartment... The Jedi do not pay the help well... but he doesn't care because the process of getting hired to cook and clean for the Jedi is so difficult that the low pay doesn't matter... he's happy that they feel they can trust him repair their equipment that the prestige of getting to brag about his job is more than enough compensation, which helps understand why so many were willing to believe the Jedi had betrayed the government. The people who beg them to let them help because they believe in it... are rewarded for it by an income that forces them to live paycheck to paycheck... for starship repairs... work on Tatooine that made Watto, by dint of owning one part in his stock, richer than two Jedi and the leader of entire planet combined.
This can show how political differences can develop in different regions both big and small... and the things agreed upon can be motivated by different reasons. Watto's first meeting with a Jedi was likely insulting to him because Qui-gon tries to mind trick him into excepting currency he does not want for parts that Qui-gon cannot afford... essentially, Qui-gon is at best begging him to part with something he owns for nothing... and at worst is trying to outright steal the part by insulting his intelligence because mind tricks only work on weak minded people.
Meanwhile, in Coruscant, the desire to be useful to a Jedi, despite no public recognition, is so great, that despite enduring invasive security and background checks and long delays of a bureaucratic nature for pay that barely covers living expenses is highly competitive cleaning up the men's room after Yoda... um... cleansed himself of his inner darkness... is a highly competitive job!
Surprisingly, money looks like it has little to do with it... and everything to do with the Jedi's public image.
Your going to need a hole lot more. No society is so simple that it only has two social class. The Delusion communist may try and lump a small time business owner and Jeff Bezos into one class, but any unbiased observer can See that these 2 are on completely different levels socially and economically.
Also you're thinking too Economically, Social status isn't just about money, Includes things like fame, Heritage, Titles, And so on.
As her how many you can have. As many as you like. Brandon Sanderson has 20 social classes in one of his societies. All the depends on how your society works.
Rich and poor are not social classes, but are simply are measurement of ones economic capital. Social classes can be divided by a number of things, but the most important are social capital (SC) and economic capital (EC).
SC can be broken up into various things, such as influence, quality of friendships/connections, peoples perception of you, ancestry/heritage, etc.
EC can be broken up into all the various factors of wealth I.E. current assets (homes, construction equipment that you personally own), liquid capital, businesses that you own, sustainability of your income, income, etc.
Power itself is also important to mention, but it usually takes one of these two forms, I.E. being instated as a general makes you powerful, but is also social capital.
Classes that naturally form usually come from a combination of where you are in each of these. I will give a few rough examples you can use. (99th percentile means top 1%, 90th means top 10%, etc. When I say Average SC is 50th percentile, I mean 50th-90th, and socially inept I mean 0th-20th, etc)
SC (Highest to lowest)
- One of the most influential men anywhere (only a few around, connections with extremely powerful people, is one themselves, holds large amounts of sway over those people.)
- Extremely influential (same as before but holds less sway, 99.999999th- percentile
- Highly influential (99.999th- percentile, can effect major matters)
- Pretty influential (99.99th- percentile, holds some sway over major matters
- Influential (99th- percentile, holds a lot of sway over minor matters)
- Slightly influential (90th- percentile, some sway over minor matters)
- Average (50th- percentile, has some friends, holds some very little sway over minor matters)
- Not influential in the slightest (20th percentile, holds very little to no sway over very minor matters)
- Socially inept (0th percentile, sway gets less and less the farther you go down, sometimes even reaching the point where if you try and stop something, people will want to do it more.)
EC (Highest to lowest)
- Most wealthy people in the universe (Only a few around, controlling assets that can make the most dominant superpowers turn their heads)
- Ultra-Ultra rich (99.999999th- percentile, who own huge amounts of wealth that are worth more than most sucessful companies
- Ultra Rich (99.999th- percentile, extremely sucessful people, who have at least 1/10th of huge amounts of wealth more than most sucessful companies
- Rich (99th- percentile, the people who "have made it", very successful doctors, CEO's, lottery winners)
- Affluent (90th- percentile, successful individuals, less sucessful engineers, lawyers, highly skilled workers)
- Average (50th- percentile, the backbone of society, less sucessful skilled workers, sucessful laborers)
- Poor (10th- percentile, struggling to make ends meet, living hand to mouth)
- Impoverished (0th- percentile, living off benefits, homeless, in debt, etc)
Those themselves are not social classes however, just very arbitrary judgements of levels of each standard (They definitely aren't perfect just poc)
One's social class is mainly made by combining those 2, though they often effect eachother. An example is that the few wealthiest men in the universe will also be most likely some of the most influential, just because of their wealth. You can also have someone being promoted highly due to SC, or getting money from influencing events, which impacts their EC.
Then you have the actual classes, which are not a definitive judgement, but an umbrella term for certain people. Once you understand how your society works, with an interstellar civilization, you can make almost any amount of arbitrary names and terms for certain types of people.
For example, you can have (classes that are a combination of wealth and influence, though they tend to balance out over time) high, middle, low class, with each being an umbrella term for those within, I.E high has both the first in social capital and economic capital, but also the slightly influential and affluent.
From there, you can keep splitting until you have the amount that you want. You can say, all of those in the high class, that are members of a "house" and are top 99.9999th percentile in wealth shall be (insert name, I.E. Upper House).
Once again, classes are simply methods of differentiation between types of people that show broadly how much EC and SC they have.
The best example of this I know of is the Roman Empire. Because Rome conquered such a large empire from such a small central nexus of power, the Romans had to take steps to make sure that the power and influence of Rome was not superseded by those that they conquered. So to this end, your social class was not just about how rich and powerful you were, but a measure of how "Roman" you are. If you were a Freeman born in Rome, you had more rights than a Freeman born in a city that was close to Rome. And those freemen had more rights than people from cities born farther away. On top of this nobility had many different classes based on if their title could be traced back to the early days of Rome, or if thier title emerged later. There were also many different types of slaves depending on if you were a dept slave, a penial slave, or slave of war. There was also a special class for freemen who used to be slaves vs those who were always freemen. So there were perhaps a dozen or so broad social classes and even more when you really get down into the diverse localized customs or titles of privilege within a given class.
How to apply this to your setting
Earth is just one planet, but at some point we may have thousands of colony worlds and the majority of humans will not be earthlings... but Earth will still be so densely populated and at the center of the Empire's pollical infrastructure that it striates authority out based on proximity to Earth to protect the special place that Earth has in the Human Empire.
So planets that are closest to Earth will also be the most developed and have similar political needs to Earth meaning Earthlings will have more need and desire to trust them to make sure that Earth always has the backing to maintain its control. Then your outer most, least industrialized, most alien influenced worlds will be too dangerous to give significant political power too. So, just like Rome, you give greater rights to people based on proximity to Earth while also each world having it's own hierarchal system.