The answer to your question is no, the p-value or the proximity of the estimated effect to the null hypothesis (in this case, I assume it's zero or no effect) are not good metrics for predicting how well a model will perform on new data.
The p-value is a measure of the strength of evidence in support of a statistical hypothesis, not a measure of the prediction accuracy of a model. A smaller p-value suggests that we have stronger evidence to reject the null hypothesis, not that our model will necessarily perform better on unseen data.
In the same vein, the estimated effect size being closer to zero does not imply that a model will perform better on new data. It simply means that, according to the data you used to estimate the effect size, the effect is close to zero.
When you want to assess how well a model is likely to perform on new data, you are concerned with the model's predictive accuracy or generalizability, not the statistical significance of its parameters.
Model comparison based on predictive performance is typically done through cross-validation or using a separate validation dataset. Metrics such as mean squared error (for regression problems) or accuracy, precision, recall, or AUC-ROC (for classification problems) are often used.
In essence, while p-values and effect sizes are useful for understanding the properties of your model and the relationships in your data, they do not directly provide information about the predictive performance of your model.
Moreover, be cautious about the use of a p-value threshold (like 0.05) to determine the validity of a model or effect. The p-value is a continuous measure of evidence, and the choice of a particular threshold like 0.05 is somewhat arbitrary and can lead to dichotomization of results, which is a topic of ongoing debate in the statistics community.