Deusovi has already given the general answer. I want to add one caveat.
“Inspired by” is quite different from adopting actual parts of the original puzzle’s solution path, and/or particulars of it, such that an answer to your question is inevitably a giveaway of significant parts of the other.
If you take inspiration from certain mechanical parts of a puzzle that are readily apparent—like the prefix/infix/suffix mechanic of the so-called “Riley riddle” or the whole thematic presentation of the “What is a ... Word™️“ series, or any of various logic grid or logical-deduction puzzle styles—where what you’re using is essentially “how this genre works” but not appropriating the specifics of a particular puzzle, then sure, that’s fine. Another solver will clearly see the resemblance and may even be able to apply methods or ideas they learned from the original puzzle to the new one, and that is perfectly fine—that’s learning and making use of experience, something I hope we all can do as often as possible :)
I do think, though, that a puzzle where you could cut and paste a meaningful part of the “inspired” question’s solution directly into an answer to the original, has crossed a line that shouldn’t be crossed.
It’s not clear what extent of “inspiration” you’re asking about. Reusing puzzle formats and rules is fine - that’s borrowing the idea, presentation, and/or visible mechanics of the original as inspiration for your own, and that is perfectly fine. Reusing an actual piece of someone else’s puzzle as an element of your own, with the same solution path through it and the same result, is not “inspiration” so much as actual copying, and I think that is not okay. And I don’t think the age of the original or whether it’s been solved in its entirety yet or not matters here.
Hope that helps!