Is there a way to migrate a SharePoint site, including document library, site collection, and everything else, finally the entire content of an On Premises environment for the SharePoint Online environment using only PowerShell?
Yes, you can use Powershell to migrate SP Onprem to SP Online. Please refer to below article for detailed information:
There are ways to migrate the site collection from a On Premises environment to a SharePoint Online environment. However, I do not think Powershell is the best way.
I suggest you use a third tool. Using Powershell, the amount of time and effort involved will normally cost a client far more than a third party tool. Especially if you have a customized UI in On Premises environment.