1. Draft the patent application. You don't even need to do any research. The PTO will do that for you.
2. Wait for the application to be rejected, which it almost certainly will be the first time around. But the rejection is required to contain specific reasons for the rejection, which will almost always be citations of prior patents that already cover what you have claimed (because there is no shortage of stupid patents). In effect, the PTO does your homework for you.
3. Tweak the application to get around the specific objections the PTO cited and re-submit.
4. Iterate if necessary. But I have never had to go more than one round, and I have eight patents.
You also can only tweak with regard to disclosures already described in your application.