Please refer to this post first if a quick intro to the use of the FFT and what "subcarriers" are in OFDM is needed. The following graphic was copied from this other post that provides additional details of Sampling Frequency Offset (SFO) and Sampling Time Offset (STO):
What we see is the effect, in the time domain, of a SFO and STO. As we know from the Fourier transform of a fixed time delay, a fixed delay in time (time offset) results in a linear phase in frequency:
$$x(t-\tau) \leftrightarrow X(\omega)e^{-j\omega \tau}$$
For a discrete time system with a fractional delay offset, this results in a phase versus frequency as given in the plot below. Here is shown the impulse response (more formally the "unit sample response" in discrete time processing) of a delay $\tau$ that is a fraction of the sample time $T$, and the corresponding linear phase over frequency from DC to the sampling rate $f_s$.
What we will see therefore is a different rotation for the constellation of each subcarrier (at each frequency bin) in the OFDM waveform. This cannot be simply ignored, but the individual sub-carriers can be corrected with a corresponding phase rotation, and unlike CFO, there is no loss of orthogonality between sub-carriers (the loss of orthogonality due to CFO is explained as an inter-carrier interference as detailed in this other post).
Since each subcarrier increases linearly in frequency, the phase rotation in the constellation between adjacent bins will be constant. By measuring the rotation from bin to bin, we can make a discriminator that will tell us the rotation. This can and is done using the pilot bins since they are at known locations, but also can be done for finer resolution between all bins using decision directed approaches.
Sampling time offset is easily simulated through the use of fractional delay all-pass filters. See these existing posts on ways that is done using either polyphase filters or Farrow filters:
Emulating a Variable Delay
Fractional Delay using Polyphase Filter
Coefficients of Farrow structure?
https://www.dsprelated.com/showarticle/22.php
In contrast, a SFO will result in the rotation of an individual subcarrier as we move forward in time (from one OFDM symbol to the next). Thus by using the phase rotations between bins (in frequency) and between symbols (in time for each subcarrier) we can uniquely resolve both SFO and STO.