THE RECIPE
Apply the First Law of Thermodynamics to the irreversible process to determine the final thermodynamic equilibrium state of the system
Totally forget about the actual irreversible process (entirely), and focus instead exclusively on the initial and final thermodynamic equilibrium states. This is the most important step.
Devise a reversible path between the same two thermodynamic equilibrium states (end points). This reversible path does not have to bear any resemblance whatsoever to the actual irreversible process path. For example, even if the actual irreversible process is adiabatic, the reversible path you devise does not have to be adiabatic. You can even separate various parts of the system from one another, and subject each of them to a different reversible path, as long as they all end up in their correct final states. Plus, there are an infinite number of reversible process paths that can take you from the initial state to the final state, and they will all give exactly the same value for the change in entropy. So try to devise a path that is simple to work with (i.e., for which it is easy to apply step 4).
For the selected reversible path, evaluate the integral of dq/T from the initial state to the final state, where dq is the incremental amount of heat added to the system along the sequence of changes comprising the reversible path. This will be your change of entropy S. That is, $$ΔS=∫\frac{dq_{rev}}{T}$$ where the subscript rev refers to the reversible path.
Reference https://www.physicsforums.com/insights/grandpa-chets-entropy-recipe/
I also wanted to mention a little-emphasized (but important) fact regarding the Clausius inequality: In applying the Clausius inequality to an irreversible process, it is important to use the temperature at the interface $T_I$ with the surroundings (where the heat transfer dq is occurring) as the T in the integral. That is $$\Delta S\geq\int{\frac{dq}{T_I}}$$where the temperature at the interface might be that of a constant temperature reservoir (for example), and, for an irreversible path, dq is the actual heat flow during the irreversible process.
ADDENDUM:
The Clausius Inequality represents a mathematical statement of the 2nd Law of thermodynamics that, as Clausius showed, is fully equivalent to various "word statements" of the 2nd Law (such as the Kelvin-Planck statement and the Clausius statement). The Clausius Inequality says that, if you look at the infinite number of possible process paths between the initial and final thermodynamic equilibrium states of a closed system (i.e., no mass entering or leaving, but heat flow and work permitted), each processes path is characterized by a different "time history" of the heat flows dq(t) and temperatures $T_I(t)$ at the boundary between the system and its surroundings.
Clausius discovered something astonishing: He found that, for any given pair of end states, if you calculate the value of the integral of $\frac{dq(t)}{T_I(t)}$ over the infinite set of possible process paths, the range of values you obtain for the integral is not infinite. There is an upper bound to the value calculated for the integral over all the possible process paths. Since this maximum value depends only on the two ends states, it must be a function of state. Clausius called this function the entropy S.
He then made another astonishing discovery. He found that, for the infinite set of process paths between the two equilibrium ends states, there is a closed subset of these paths all of whose members give exactly the maximum value for the integral of $\frac{dq(t)}{T_I(t)}$. This subset of process paths is what we describe today as reversible process paths. So, all reversible process paths give the maximum value for the integral (i.e., $\Delta S$), and all irreversible process paths between the same initial-and final thermodynamics equilibrium states give less than the maximum value.
This is the motivation for doing step 3. It is the only way we know of for determining the change in entropy between two thermodynamic equilibrium states of a closed system.