PowerShell has a few interfaces for executing and writing code. The PowerShell CLI is exactly that. Runs just like a DOS window where you can type out and execute code. The ISE has a separate part of the interface that allows one to utilize the pane for writing out scripts instead of one-liners. Do note, I have seen issues with locking of saved files and other issues in the ISE. It is great for creating scripts but for end run testing use the CLI window to execute the script to assure it works or if you see it working intermittently in the ISE.
PowerShell CLI ||
Visual studio Code is a great FREE tool for editing
all sorts of different types of languages including PowerShell.
Another great tool for creating PowerShell scripts is an application created by a company called Sapien. I utilize this for scripting and using the interface to generate Widows Forms to make applications with a PowerShell backend. Sapien PowerShell Studio