Logic is something I am entirely self-taught in. Due to my resulting ignorance, it is difficult for me to search for the right things. Therefore, please excuse me if this has been asked before.
The Details:
In this YouTube video by Attic Philosophy, an approach to doing natural deduction proofs is demonstrated but neither proven nor rigorously defined. (It is just an introduction.)
Essentially, one works backwards. The example given is a proof of
$$p\to (q\to r)\vdash (s\to p)\to(q\to(s\to r)).$$
We start by assuming $p\to (q\to r)$, leaving a big gap, then writing $(s\to p)\to(q\to(s\to r))$, like so:
$$\begin{array}{|lc} p\to (q\to r) & \\ \hline & \\ & \\ & \\ & \\ & \\ & \\ & \\ (s\to p)\to (q\to (s\to r)). & \end{array}$$
Then we assume the first bit of the conclusion and do the same thing as above, like so:
$$\begin{array}{|lc} p\to (q\to r) & \\ \hline \rlap{\begin{array}{|lc} s\to p & \\ \hline & \\ & \\ & \\ & \\ & \\ q\to (s\to r) & \end{array}}&\\ (s\to p)\to (q\to (s\to r)). & \end{array}$$
And again:
$$\begin{array}{|lc} p\to (q\to r) & \\ \hline \rlap{\begin{array}{|lc} s\to p & \\ \hline \rlap{\begin{array}{|lc} q & \\ \hline & \\ & \\ & \\ s\to r & \\ \end{array}}& \\ q\to (s\to r) & \end{array}}&\\ (s\to p)\to (q\to (s\to r)). & \end{array}$$
Once more:
$$\begin{array}{|lc} p\to (q\to r) & \\ \hline \rlap{\begin{array}{|lc} s\to p & \\ \hline \rlap{\begin{array}{|lc} q & \\ \hline \rlap{\begin{array}{|lc} s & \\ \hline & \\ & \\ r \end{array}}& \\ s\to r & \\ \end{array}}& \\ q\to (s\to r) & \end{array}}&\\ (s\to p)\to (q\to (s\to r)). & \end{array}$$
Now we fill in the gap using all the assumptions we like from above it, like so: because there's an $r$ in the first row, we can use modus ponens using $s$ and $s\to p$, which gives $p$, then again with $p$ and $p\to(q\to r)$ to get $q\to r$, from which we get $r$; this looks like:
$$\begin{array}{|lc} p\to (q\to r) & \\ \hline \rlap{\begin{array}{|lc} s\to p & \\ \hline \rlap{\begin{array}{|lc} q & \\ \hline \rlap{\begin{array}{|lc} s & \\ \hline p & \\ q\to r & \\ r \end{array}}& \\ s\to r & \\ \end{array}}& \\ q\to (s\to r) & \end{array}}&\\ (s\to p)\to (q\to (s\to r)). & \end{array}$$
The Question:
How/where is this technique generalised and proven for other (standard, first order) logical operations (if possible)?
Context:
I am familiar with the method of analytic tableaux.
To get an idea of my capabilities, see this question of mine:
An alternative, formal proof that $(\lnot\forall xPx)\to(\exists y(\lnot Py)).$