The below script shows you how to fetch the chekcedout files from a SharePoint library using Microsoft 365 CLI. The information about installing the package is described in below URL,

https://pnp.github.io/cli-microsoft365/

Microsoft 365 CLI command