Potentially? Viper29567 points it out below, but you might be able to use Internet Recovery to restore the OS if you buy a compatible 3rd party SSD:
The next ideal situations for this product would be if you already had this laptop, but it was damaged and you swapped the SSD from one to the other…or if you were able to purchase an SSD with the Mac OS software pre-installed.
I’m sure there are other ways to get the software, but these would be the most ideal scenarios.