I forgot to mention two other possibilities to consider in the #WhichvsThat debate. If you are still not sure, you can always try your sentence without a relative. Ok, hold it there, Uncle Jim, I mean use no / zero relative pronoun. So you could say just, "The piece I prepared earlier wasn't really finished." Yes, that works as a defining relative clause. Or "The piece, I prepared earlier, wasn't really finished." No, something missing and doesn't sound right with pauses. (Unless you mean it as non-defining and add a "which".)
On the other hand, if unsure, just use "what / wot" à la Ernie Wise.
[****Joke - NB reinstate Irony Warning System (IWS)****]
Um, sorry, little Ern, should that have been "au"? I never know.
Anyway, thanks (and apologies) to Eddie Braben (I think) for writing those marvellous "the play what I wrote" Morecambe and Wise skits. Yes, that is Morecambe with an A, for my overseas audience - or actually for many non-Lancashire home fans, too. Thanks to my loyal UK follower also for the prompt.
And be careful with your commas, that's the important point. Now, I know, Muphry's Law holds that I will have made several punctuation and other errors by this stage. But this is an amateur blog, for love only, not a newspaper or a legal agreement. And I use a deliberately informal, colloquial style here - even using lots of dashes! (And afterthoughts in brackets.)