Cholesterol is produced naturally in abundance daily by the body. This cholesterol aids in the production of cell membranes and healing of artery walls, aids in making bile for digestion, vitamin D, sex hormones, myelin and aids the immune system too. It has two categories, HDL (high density lipo-proteins) and LDL (low density lipo-proteins). HDL carries cholesterol from the blood vessels back to the liver and LDL carries cholesterol from the liver to the blood vessels.
LDL has two sub categories that is not often investigated or understood. Type A and B. Type A is large/fluffy cells that are non-plaque forming and are raised when consuming saturated fat. Type B is small and dense and is plaque forming and raises when consuming sugars and increased cortisol levels. Type A is higher when triglyceride numbers are in range and HDL is in range or high, this is a good thing. Type B is higher when triglyceride numbers are out of range (high) and HDL is lower, this is a bad thing.
Expect LDL to raise on the keto / IF plan because the body is releasing fat which contains cholesterol from the cells. This fat has to go somewhere to exit the body and enters the blood thus raising cholesterol. Over time, this will lower as the body returns to a normal, healthy weight. This is not promoted or understood by modern medicine and expect many doctors to advise the use of statin drugs to lower cholesterol which is not recommended by the keto community.