I don't believe that you can install Lightroom 5 or Lightroom 6 on a new MAC (well, technically, it can't be installed on OS X 10.15 or later). So you can't install and use Lightroom 5 or Lightroom 6 if you have OS X 10.15 or later. You would need to subscribe to the current version of Lightroom Classic to continue using your Lightroom catalog.
Depending on your 'new' Mac computer and OS, you'll be unable to install because the newer OS only supports 64-bit applications and the older installers are 32-bit. You'll have to see if you can boot off an older OS (pre- Catalina), install either or both LR6 and LR5, THEN you can boot into Catalina and use them. I have a copy of LR5 running pretty much fine (excluding the broken Maps module) under Catalina.