An outline (algorithm) for what would have been the first piece of software was written by Ada Lovelace in the 19th century, for the planned Analytical Engine.
However, prior to 1946, software as we now understand it programs stored in the memory of stored-program digital computers did not yet exist.