Well, I’ve never had a reason to use Pnp PowerShell for anything.
On-prem I use SP and in SPO, I use the SPO version.
Any needed cmdlet for a script must already be on your system or you have to manually install just as you had to do to leverage the PnP module. There is not magic way to auto do this. If the PnP module does not have the requisite cmdlets, then you need to move to a module that does.
You say you are new to PS, then it’s really very important that you get some ramp up on it before you unnecessarily frustrate yourself running into blockers, logic errors or troubleshooting, as you are here. There are lots of beginner to advanced level, no cost training via the MS Viraul Academy, MS TechNet Virtual Labs, and YouTube, as well as a plethora of no cost eBooks on this very site and on MS TechNet.
PowerShell Survival Guide
Looking a that MS Docs papers on the PnP PowerShell topic, just like with the standard SPO module, you have to connect to SPO via PnP with to be able to use the PnP cmdlets.
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
However, the docs further stat that…
SharePoint Patterns and Practices (PnP) contains a library of PowerShell commands (PnP PowerShell) that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online as SharePoint On-Premises.
… and lists the cmdlets that are part of the module.
You ran this…
Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending
… which should show you a result of the module is loaded or not.
What you have not run, is…
Get-Command -Name '*pnp*'
… to see the full command list that is in the module. Whether you did the above or just looked at the MS Docs site link above. You’ll instantly see that the cmdlet you are after is not part of the module. In reading the docs, what you are trying to do is what the normal SP/SPO cmdlets are for, not the PnP module, since that is not it’s mission.
The base SP/SPO cmdlets are all about management and administration. The PnP ones are a special Dev use case thing.
So, if that is your thing, then you need both the PnP and the standard SPO module on your machine for your script to work as designed.
See this article: