Just as the first law is universal only when expressed in words, the expression of formulas is usually limited. For example, δ u = q+w is a closed system, and the kinetic energy of the system remains unchanged. Obviously, the common counterexample of the former condition is friction heat generation (assuming adiabatic conditions). In this process, the external friction does negative work on the object, but the internal energy of the object increases. The source of internal energy increase is the decrease of kinetic energy of objects.
As for the condition of non-volume work, it is very common in thermodynamic formulas. The definition of cv = lim (Δ q/Δ t) v is universal, but Cv=(dU/dT)v must have no non-volume work, because the non-volume work condition is used in the derivation. When there is non-volume work, Δ qv = Δ u-w, where w includes volume work (zero) and non-volume work (non-zero), so Δ qv is not equal to Δ u, and Cv=(dU/dT)v is not valid.
For another example, according to the first law dU=dQ+dW and entropy definition dQ=TdS and volume work dW=-pdV, dU=TdS-pdV is deduced. When there is non-volume work, dW should also include non-volume work dW', and the basic equation should be dU = TdS-pdV+dW'.
If thermodynamics is difficult, the biggest difficulty lies in the applicable conditions of different formulas. Only by remembering the derivation process of the formula on the basis of understanding can we understand this formula, and it is not easy to make mistakes, even if mistakes are often inevitable, even if there is a slight negligence.