Germs on your mask made you Sick.
Highly unlikely unless you are sharing your mask with someone else.
Using a CPAP will not give you a cold or the Flu. If you catch such a bug, you already obtained those germs from people you have interacted with. The germs on your mask are from you.
It is a good idea however to keep your machine and mask clean...
If you have a cold, you might need to adjust how you use your CPAP. Too much humidity or even too little can cause congestion, you are less comfortable and so you might move around more, coughing etc..
Also, using a nasal mask might be harder to do due being plugged up. Sometimes using a different mask like a FFM (Full Face Mask) will help.
As for the germs... remember that you are only using your CPAP while you sleep. The rest of the time you are walking around without a filter and being exposed to what ever is in your environment and the people and places you visit.