Not a bad question. In fact, some of the fares you find may limit or completely impair your ability to earn miles when you fly. This is because airlines have special “discount” fares, and some of these have rules against earning miles.
However, you will always earn points and miles through your credit cards, so make sure to use your travel rewards card or your airline credit card when booking.