There are additional complications in that many cold viruses generate only partial or temporary immunity, and the immunity wears off in a couple years. Also that coronaviruses mutate fairly quickly (though not as quickly as influenza, another illness that's caused by a family of viruses rather than a single one and generates only temporary immunity). I've heard that coronaviruses are also fairly hard to develop vaccines for because of technical reasons that I don't really understand.
But if your goal is partial, temporary immunity to protect against a circulating pandemic - similar to a flu shot - it's theoretically possible. That partial, temporary immunity is why adults get fewer colds than children do - they already have immunity to many of the cold viruses circulating within the local population.
(note: I know nothing when it comes to health related issues like this so I'm assuming it's completely naive thought since I haven't seen anyone else mention anything similar)