Since long ago, the "official" name of the build number env variable in Jenkins is BUILD_ID.
While the previous BUILD_NUMBER one still works perfectly, right now we have a mix of uses. This is about to move all to be BUILD_ID (that is the official one and the one used by our newer tools).
Ref.: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
Ciao :-)