I actually managed to fix the issue following the steps mentioned in another community post:
Please refer to “youaremine”’s response.
In my case, the driver which caused the issue was realtek_service.ini. I later deleted it from the system and the 24H2 update finally got installed. I was worried it would cause audio issues but in fact, everything works perfectly fine. My guess is this driver is obsolete and its functions are completely replaced by another driver, and the system somehow kept it until I encountered the error with the Windows update.
Still, thank you for your response!