I'm studying linear regression tasks and some transformation of data, in order to make the model linear, and to make the L-I-N-E assumption of linear regression met.

I know that if we have a non-linear population model, something like this : $ y = \alpha x^c $
We can perform log-transformation of both predictor and response variable and get a linear relationship between $log(x)$ and $log(y)$. $$ log(y) = log(a) + clog(x) $$

Or if the population model was originally like this : $y = \alpha e^{cx}$ , then one proper step to get to linear model is to transform the response $y$ variable and we get : $$ log(y) = log(a) + c \times x $$ Hence, optain a linear relationship between $log(y)$ and $x$ .

Here is my question: Most of regression tasks, we never have the population equation, so that we do not know what is the exact non-linear relationship of the original data. So after detecting that we have to use some non-linear model ( by residual plot as I study ), how do we know the appropriate transformation to use? When should we transform the predictor $X$, or the response $y$ , or both.