Above error comes because you dont have a default powershell profile file
IN powershell terminal Run,
<pre lang="powershell">echo $PROFILE
Output will be in this format which is the path to default powershell profile
eg.
C:\Users\abesh\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
The error comes because above file is not present, hence create it and put a space inside it and save it
nvim C:\Users\abesh\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Dont keep the file empty, add space and hit :wq to save and exit in nvim
Now run
nvim $PROFILE.CurrentUserCurrentHost
Add following lines to the file
. $env:USERPROFILE\.config\powershell\user_profile.ps1
Save and exit, You will not encounter any error.