Before you evaluate the data, detecting overfitting is nearly impossible. It can help with the difficulty of generalising data sets, which is an intrinsic feature of overfitting. As a result, the data may be divided into distinct subsets to make training and testing easier. The proportion of accuracy seen in both data sets can be used to determine whether or not overfitting is present. If the model performs better on the training set than on the test set, there are chances that it's overfitting. Another suggestion is to begin with a very basic ML model to act as a baseline. Later, when you test complex algorithms, you'll have a benchmark against which to judge if the added complexity is worthwhile. Validation measures such as accuracy and loss can also be used to detect overfitting. When the model is impacted by overfitting, the validation measures generally grow until they plateau or begin to decline.