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 (*)?