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.
Absolutely nothing other than your willingness to pursue it and pay the fees.
As an exercise, I once applied for a patent on a device that would violate the laws of physics (specifically allowing faster-than-light communications) to test the theory that you can in fact patent anything. The result was receiving U.S. patent number 7126691.
https://patents.google.com/patent/US7126691B2/en