The Jenkins docs say:
artifacts
You can use wildcards like 'module/dist/**/*.zip'. See the includes attribute of Ant fileset for the exact format. The base directory is the workspace. You can only archive files that are located in your workspace.
Type: String
but I'm not clear how you add 2 separate artifacts.
Do you have 2 separate archiveArtifacts commands? Or separate artifact filenames by a space?
E.g.
archiveArtifacts artifacts: "my.tar.gz my2.txt", fingerprint: true
archiveArtifacts artifacts: "my.tar.gz", fingerprint: true
archiveArtifacts artifacts: "my.txt", fingerprint: true
https://jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts