You can use Rufus on another pc to install windows on that external SSD choosing the windows to go option in Rufus. Then you should be able to just plug it into the laptop and boot from it. Or just use Linux and you can install it on an external SSD
Framework
Discussion around the Framework mission of building products that last longer by making them upgradeable, customizable, and repairable. Consumer electronics can be better for you and for the environment.
Here's one way: https://answers.microsoft.com/en-us/windows/forum/all/installing-windows-to-an-external-drive-literally/c5f46404-acfa-4a9e-845e-39b4a1889553
Another would be installing the external drive internally first, installing it, then shut down before the first boot (before it enters the OOBE), then pulling the drive out and put it back into it's external enclosure.
Another would be to use DISM to apply the install.wim image onto an external drive.
Please read up on how to use DISM and how WIM images work. It'll give you a better understanding of how windows installation and imaging work so you can manipulate it in very interesting ways.