What version of the software are you using? (It shouldn't matter, but I can try to reproduce what you're seeing). This is what I'm seeing:
In the Geoprocessing pane, I select Toolboxes. In The Spatial Statistics toolbox under Mapping Clusters, I right click on the Cluster and Outlier Analysis tool, select Edit, and up pops the script.
Another way to find it is to navigate to: <your ArcGIS folder, where ever you installed the software... like maybe in ProgramFiles\ArcGIS> then navigate to: \Pro\Resources\ArcToolBox\Scripts and view the LocalMorans.py python script file. For example, you should be able to right click that file and choose open with <Notepad or Wordpad, for example>
I hope this works for you!
Best wishes,
Lauren