It is always best to install the CPU first, after that, apply the thermal paste, then install the cooler, and then move on to installing RAMs. Sometimes, the cooler can make it difficult to install RAMS. So, you might have to install the RAMs first.