At the heart of Special Relativity lie the Lorentz transformations, invented by the Dutch physicist Hendrik Antoon Lorentz (the name of the transformation was given by Poincaré in 1905). He wrote them down well before Einstein came up with his SR in 1905.
It was devised as a theoretical transformation which makes the velocity of light invariant between different inertial frames.
Lorentz believed in the aether as most physicists did in that time. But nevertheless, the transformations emerged from his mind.
Einstein, on the contrary, didn't believe in the aether and showed that the transformations followed from his Principle of Relativity and the constancy of the speed of light in every inertial frame (for which the transformation was devised in the first place; see citation). But he didn't invent the transformations.
Has Einstein gotten the credits of inventing (discovering) SR because of his Principle of Relativity, denying the aether, uniting space and time to an absolute spacetime, and declaring that the speed of light is constant in every inertial frame (which also followed from the Lorenz transformations)?
For sure, Einstein didn't discover (invent) the transformations. He "only" showed that they follow from the constancy of the speed of light in every inertial frame.