Given comments that the collapse of the wavefunction is still not understood, I'd like to emphasize experimental observations.
Imo the term "collapse of the wavefunction" is a misleading term for "interaction" or measurement..
The wavefunction is not measurable,it is a complex-number mathematical function necessary for calculating quantum mechanical probabilities of an interaction happening. It is not an observable balloon that can collapse. Only the complex conjugate square of a wavefunction is observable
Take a simpler mathematical solution , the parabola of a projectile: Is the parabola observable? Only the projectile's motion is observable. If suddenly the projectile changes direction, we will not say that the parabola was broken. We will look for the obstruction in the path of the projectile, i.e an interaction that will change the model function.
So measuring the spin collapses the wavefunction. What else does?
The wave function is a solution of a quantum mechanical differential equation with the boundary conditions of the problem. Any interaction changes the boundary conditions, and measurements are interactions.The measurement will give one point in the probability density distribution which can be measured by repeating the process many times.
This single electron double slit accumulation can give an intuition of how a probability density is connected with individual measurements:
Electron buildup over time
Each electron fired at the two slits has a probability on ending as a point in the screen. Once it hits the screen its wavefunction is no longer controlled by the boundary conditions "electron impinging on two slits with given dimensions". It has been absorbed in the screen raising dots from a large number of ionizing interactions with the molecules of the screen.
Does it have a meaning to ask whether the "wave function collapsed"? A new wavefunction is needed the instant the electron impinges on the first atom of the screen.
The wave function leaves its imprint in the probability distribution shown in the later slides, showing the wave nature of the electron, which is the complex conjugate squared of the wavefunction. For a single electron only a point can be seen.
So all quantum mechanical solutions of specific boundary value problems give wave functions which , once the boundary conditions change, by interactions, the old wave function is not longer valid and a new one has to be calculated with the new boundary conditions.