Hi @john john Pter,
Thanks for reaching out to us. We are very pleased to assist you.
Unfortunately, we have to execute separate scripts for each document library if they have different limits.
The New-SPOSiteFileVersionBatchDeleteJob command needs to specify the document libraries that need to be trimmed versions, so if the document libraries have different limits, we would need different scripts.
We realize that it would be tedious to run separate scripts for each document library, but this is the only way we can do it at this time. We apologize for any inconvenience this may cause.
If you have any questions, please do not hesitate to contact me.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. It will be beneficial to more community members reading here. Your contribution will be highly appreciated.