Why defining homotopy on functions instead of spaces? Apparently, the definition of homotopy formalizes the idea of continuous transformation between two things.
(*) Let's take this motivating example: I have $ S,S' \subset \mathbb{R}^3 $ two surfaces in space. If I wanted to define a continuous transformation between them I would request for a continuous function $\Gamma:S\times [0,1] \rightarrow \mathbb{R}^3$ to exist such that $\Gamma(\cdot,0)=id|_S $ and $Im(\Gamma(\cdot,1))=S' $.
Instead, the definition in use is not between spaces ($S$ and $S'$) but between functions. I think my definition (*) would be a special case of the definition in use.
In fact, by posing $f:=\Gamma(\cdot,0)=id|_S$ and $f':=\Gamma(\cdot,1)=id|_{S'}$ I have that $f\simeq f'$.
Can someone clarify what's the limitations (or what's wrong with) my definition (*)?

I think this is a very nice question, and your definition (*) is very close to the definition of an isotopy. You want to also require that $\Gamma(S,t)$ is an embedding for all $t$ so that you can't collapse everything to a point (as was pointed out in the comments). Otherwise, any two maps would be equivalent.
I think it's useful as well to compare isotopy to the notion of homotopy equivalence. As an example the circle is homotopy equivalent to itself via the identity map, but it has many distinct (up to isotopy) embeddings in $\mathbb{R}^3$. Specifically, the unknot and trefoil can be shown to be non-isotopic using various knot invariants.
