The first option takes FOUR parameters, not three! system.management.automation.host.pshostuserinterface.promptforcredential
For your intended purpose they both produce a usable result. Using the Get-Credential cmdlet offers less opportunity to make errors.