You cannot update/replace/upgrade the built-in Windows OS version of
Windows PowerShell.
You can only install PowerShell Core (PowerShelv6 and beyond) as a
side-by-side install.
There is no native way to make PowerShell Core the OS default.
There is no such option or use case for copying PSv7 files on top of WinPS. System files are always in use, and can not be replaced while the OS is running.
You have to make many manual filesystem and registry edits to get close, but that still does not replace anything, You are just changing pointers to PSv7.
Windows Powershell will part of the Windows OS release for the foreseeable future as per Microsoft.
PowerShell Core (v6 and beyond) is a cross-platform Open Source project, that MS has already said will never be part of the OS as Windows PowerShell is, because of the OSS nature or PowerShell v6 and beyond.
If you mean changing the WinX settings, right-click settings, etc., then that is filesystem and registry hacking. There a few articles online regarding the topic.
You will also need to set VSCode, or the Windows Terminal settings to PSCore. Since no more work is going into WinPS, this also means the PowerShell ISE is what it is today, forever. There is no native way to use PSv7 in the Windows PowerShell ISE.
However, there are ways to use PSv7 via runspaces in the ISE. See this article/video.
https://old.ironmansoftware.com/using-powershell-core-6-and-7-in-the-windows-powershell-ise
Yet, save yourself the headache and just use VSCode, unless you are not allowed to install that.
https://docs.microsoft.com/en-us/powershell/scripting/install/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.1
PowerShell 7 works side-by-side with Windows PowerShell letting you
easily test and compare between editions before deployment. Migration
is simple, quick, and safe.
PowerShell 7 is supported on the following Windows
• Windows 8.1 and 10
• Windows Server 2012, 2012 R2, 2016, and 2019
PowerShell 7 also runs on macOS and several Linux distributions. For a
list of supported operating systems and information about the support
lifecycle, see the PowerShell Support Lifecycle.
Using PowerShell 7 side-by-side with Windows PowerShell 5.1
PowerShell 7 is designed to coexist with Windows PowerShell 5.1. The
following features ensure that your investment in PowerShell is
protected and your migration to PowerShell 7 is simple.
• Separate installation path and executable name
• Separate PSModulePath
• Separate profiles for each version
• Improved module compatibility
• New remoting endpoints
• Group policy support
• Separate Event logs
Separate installation path and executable name
PowerShell 7 installs to a new directory, enabling side-by-side execution with Windows PowerShell 5.1.
Install locations by version:
• Windows PowerShell 5.1: $env:WINDIR\System32\WindowsPowerShell\v1.0
• PowerShell Core 6.x: $env😛rogramFiles\PowerShell\6
• PowerShell 7:$env😛rogramFiles\PowerShell\7
The new location is added to your PATH allowing you to run both Windows PowerShell 5.1 and PowerShell 7. If you're migrating from PowerShell Core 6.x to PowerShell 7, PowerShell 6 is removed and the PATH replaced.