The connections between thermodynamics and quantum information processing are of paramount importance. Here, we address a bipartite entanglement via extracted work in a cavity magnomechanical system contained inside an yttrium iron garnet (YIG) sphere. The photons and magnons interact through an interaction between magnetic dipoles. A magnetostrictive interaction, analogous to radiation pressure, couple's phonons and magnons. The extracted work was obtained through a device similar to the Szilárd engine. This engine operates by manipulating the photon–magnon as a bipartite quantum state. We employ logarithmic negativity to measure the amount of entanglement between photon and magnon modes in steady and dynamical states. We explore the extracted work, separable work, and maximum work for squeezed thermal states. We investigate the amount of work extracted from a bipartite quantum state, which can potentially determine the degree of entanglement present in that state. Numerical studies show that entanglement, as detected by the extracted work and quantified by logarithmic negativity, are in good agreement. We show the reduction of extracted work by a second measurement compared to a single measurement. Also, the efficiency of the Szilárd engine in steady and dynamical states is investigated. We hope this work is of paramount importance in quantum information processing. [ABSTRACT FROM AUTHOR]