@mtndrew11, we use Dashboards and APIs in our environment to connect to many different O365 services. We often have to connect with different service accounts. We use an on-prem database to store all our credentials (encrypted of course). Then in the script we pull back those credentials from the database. We have a rather mature environment so that may be out of scope for you.
You could simply create a $cred variable in your $profile which loads whenever PowerShell loads and then reference it in the script whenever you want to call New-PSSession. You have have to setup the account on the server.
# Define clear text string for username and password
[string]$userName = 'MyUserName'
[string]$userPassword = 'MySuperSecurePassword'
# Convert to SecureString
[securestring]$secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword)
New-PSSession -Credential $cred
If you’re doing this for multiple accounts which have elevated permissions I would recommend storing the password and username values in a secure way. Azure KeyVault is a good solution if you have access to the internet from your server