you can do below
Run them side by side
Out of the box this won't work.
Well, you can install them, but PowerShell will automatically load the first one it finds. So in order to use them we will have to do some tweaking.
Make sure that you have uninstalled all instances of PnP Powershell that you currently have available on your machine. If you installed it previously using install-module, simply use uninstall-module -Name SharePointPnPPowerShell -AllVersions.
Now download all of the modules to a location that you are aware off, say you created a folder called c:\bin\pnppowershell
Use the following commands to download them:
Save-Module -Name SharePointPnPPowerShell2013 -Path c:\bin\pnppowershell
Save-Module -Name SharePointPnPPowerShell2016 -Path c:\bin\pnppowershell
Save-Module -Name SharePointPnPPowerShellOnline -Path c:\bin\pnppowershell
From now on, if you want to use a specific version of PnP PowerShell, you will have to manually import them (make sure to replace the version number with your current version):
import-module C:\bin\pnppowershell\SharePointPnPPowerShell2013\2.24.1803.0\sharepointpnppowershell2013.psd1 -DisableNameChecking
Answer directly copied from below link.