It's almost always possible to do various things. Question is whether you will find it worth doing. Pretty much I'd just take everything off the bike till all you have left is frame, fork, stem, handlebars, seat post and saddle. Maybe keep the front wheel if you don't mind mismatched wheelsets.
If the rear spacing will allow a wheel with a 12 speed cassette on it to fit then I'd put all new 12 speed components on it. Preferably all from the same group set. Mountain bike components for a mountain bike and road components for a road bike.
However in the end after running all the numbers, I'd probably just buy a new 12 speed bike already made. If you're like me you are probably ready for a new bike.
Last edited by Iride01; 11-08-22 at 04:46 PM.