Automatic build numbering

Dear Experts,

What is the current best practice for build numbering?

I ask because I am aware that when exporting an archived app for upload I am now asked if I want Xcode to manage the build number for me. In the past I have set a build number in the Info.plist, often based on the date, e.g. 2.4.20230218. Now, I am asked if I want that to be replaced by something like 2.4.7 (if I recall correctly). So far I've answered No.

Previously I have searched for automatic build numbering and I've found web pages that suggest adding a script to the build process that automatically increments the build number in the info.plist, or similar. I've not tried to implement that myself.

In some of my apps, I have code that needs to know the full version at compile time (e.g. app receipt validation). How would that interact with the new feature?

Thanks, Phil.