You can simply use
CLM (cloud mask) or
CLP (cloud probability) “bands” both with Sentinel-2 L1C or L2A data (e.g. define them as layers in configurator tool or use them in your script to remove cloudy data).
I understand CLM and CLP becomes good help to detect clouds. My next question is how I am removing cloudy data detected by CLM/CLP bands. The blog post shows a way of changing RGB if sample.CLM == 1. How would cloudy data be removed in this case?
When you say removed, what would you replace it with?
Replacing cloudy parts with no cloudy parts.
What you are looking for is called a “cloudless mosaick”. There are already some blog posts on that topic (e.g. How to create cloudless mosaic), and another one is on its way (to be published in next days, will update the answer when it is finished).
Beware that preparing cloudless mosaic requires dealing with temporal data (one needs several observations to get at least one good cloudless observation). Look around the forum as well, I believe there should be some posts on that topic.