add_p() includes only comparison tests between groups. For correlation coefficients or other statistical tests, you can use add_stat(). There you can specify a custom function (e.g. cor.test) and apply it to your desired variables. Check this out for more information :
I understand that add_p() is mainly for group comparison tests, and for correlation analysis we should use add_stat() with a custom function like cor.test .
Right now, I am exploring gtsummary more deeply, and your guidance really helped me understand the correct approach. I will try implementing this in my analysis.