To bypass the expired certificate I using a temporary workaround by changing the date time in PowerShell before trying to install NuGet
This was mentioned in this GitHub issue: https://github.com/PowerShell/PowerShellGallery/issues/328
Set-Date '9/8/2025 2:05:48 PM'
Install-PackageProvider -Name NuGet -Force