UE knows CSI-RS antenna ports and number of layers (equal to DM-RS ports), but it is *not* aware of Precoding.
UE is supposed to figure out best possible beam(s) and MIMO Precoding and inform it back as PMI in CSI feedback (report).
Note that (for FR1) CSI-RS are not beamformed.
UE may apply various beamforming and MIMO Precoding from Codebook to received CSI-RS and DM-RS to figure out best possible PMI for its reception.
Just like rest of RX processing, above processing is proprietary i.e. left to the (UE) implementation).
Next step (reading)
Next step is: understanding the Codebook from practical point of view (with conceptual background covered so far).
This is not in the scope of this article.
Please refer [7] and [1] (38.214:5.2.2.2) for this step.
For more on covered topics, please refer [4] (chapter 6), [5] (chapter 11), and [6] (chapters 1.21, 4.3.3, and 13.6.3).
Next page contain more references if you would like to explore polarisation, oversampled beams, and related Beamforming concepts.