What is the best way to get a receiver in sync with clock? Manchester encoding
if you wanted to create an answer, I would be happy to mark it as
correct.

If you want a software solution then you can ascertain what the embedded clock rate is by 16x oversampling the data and looking for clock edges. This is precisely what a UART does because it has to find the optimum position to sample the data to get best reliability.
For Manchester encoding (see picture below), the clock is embedded into the data stream hence there are edges that define the clock every data symbol but, you would still need to detect those edges so you can remain in sync and decode the data correctly. You could of course use a hardware interrupt scheme but that is, strictly speaking a hardware/software solution.

You should also continue to perform clock recovery throughout the whole packet of data in case of small drifts but it's less of a problem with Manchester decoding compared to UART asynchronous data or scrambled synchronous data. But, the bottom line is; use a continual method to detect clock edges and not some initial calculation based on the preamble and hope that you stay in sync for the payload data. I mean, you might get away with that but, it's not ideal.