I agree with @mluterman - there are new things in the 2024 Design Data folder that weren't available in 2021, so your 2024 installation will complain that they're missing. (Things like the new "Finish" feature have their own folder in Design Data, and there are a load more lighting styles, and other stuff.)
Compare your O:\Inventor 2021\Design Data with C:\Users\Public\Documents\Autodesk\Inventor 2024\Design Data and copy the missing files. Then use the "Style Library Manager" tool to migrate the library.
An arguably safer option is to create O:\Inventor 2024\Design Data and copy over all of C:\Users\Public\Documents\Autodesk\Inventor 2024\Design Data. Set your 2024 Project active and open all your templates and save the Styles Library changes back to the new Styles Library. That way there's no danger of losing anything - and you get to keep all the changes you made in your old templates. (This method assumes you saved all your style changes into your templates!)
Peter