PowerShell 7 does not look at %Windir%\System32\WindowsPowerShell\v1.0\Modules by default (where most 5.1 modules live). To fix this, add the legacy path to your PSModulePath environment variable:
On Linux, you typically use the native package manager. Microsoft maintains official repositories.
If you have old batch scripts or scheduled tasks calling powershell -Command , you can create a symbolic link. Warning: Test this first.