The structure of a SLAM algorithm is pretty variable and this has very different answers depending on the exact SLAM algorithm.
Some SLAM algorithms are discrete time approaches with IMUs acting as preintegration/prior for an estimator (e.g. the IMU is double integrated to get a position delta to act as the prior in an EKF), updating the belief (for both the system state and sensor states like estimated IMU biases, scale etc) on updates from however the SLAM method localises. Because the IMU is only used for preintegration, it's may not actually be part of the loop closure and SLAM localisation steps, it acts to give an initial guess for estimation and optimisation, and acts as a high frequency continuous odometeu output in which you can do control in.
In other SLAM algorithms, for example factor graph based methods, you might be able to add information from the IMU to the unified optimisation problem as factors at discrete times of optimisation alongside using it as an odometery source. There's also continuous time SLAM algorithms that can deal with asynchronous updates from the IMU similarly as part of the cost on an optimisation over polynomial splines to encorporate the information into the problem.
Because of the difference ways SLAM can be formulated, there's not really one approach. Its probably a good exercise to look into a few different state of the art approaches and see how they differ including but not limited to what's mentioned in Gtsam, Wildcat SLAM, etc.