Yes, flying involves being crowded together much more densely than we normally are in our day-to-day lives. The good news is that the HEPA filters do a very good job of screening out viruses while we are on the aircraft. However airports with their endless queues do nothing equivalent.
You are much more likely to pick up a virus while travelling, from the moment you hope into that taxi, to the moment you hop off that hotel shuttle bus. But the aircraft is at the bottom of the list of where you may have picked up that bug.
When travelling wash your hands frequently, whip down your tray with an alcohol based towelettes. Avoid queues, to the extent possible, and avoid touching things. If you've already got a cold, where a mask. You may avoid spreading your germs to the next guy.