In fitting any curve algorithms use a score to calculate how good the fit is, for example there is least square (the sum of the square of the difference between the fit and the data) where the lower score means a good fit and higher score means a bad fit. What other functions can I use for this "score" of fit?
I understand that this question is pretty broad and can potentially have different answers depending on the nature of the problem at hand. So if someone could just point out a document or a research paper or a link that would be great.
Another criterion (though by no means the only other one) is to minimize the maximum absolute deviation between the curve and the data points. (You can search the phrase "minimize maximum deviation" for references and applications.)
In keeping with the comment by user121049, you can also add terms to the criterion function that penalize overfitting. See, for instance, https://en.wikipedia.org/wiki/Regularization_(mathematics).