Certainly the easiest would be to buy a desk with a pre-mounted sliding tray.
Next easiest would be a desk kit that includes a sliding tray. There are many, many options out there, and since everything's pre-cut and pre-drilled, you don't have to worry about measurements and so forth. Some basic assembly skill is required but nothing beyond what is usually expected for Ikea-style furniture.
Adding a sliding keyboard tray kit to an existing desk would be next in difficulty. You can buy pre-made trays to add to a desk. The challenge is mostly measurement, to ensure you get a kit that fits the desk's available attachment space. After that it's just basic assembly.
The most difficult would be crafting a keyboard tray from raw materials. But that requires more advanced tools and some thought to design, so guessing this is out of scope for the question. Yet, if you got the right tools even this isn't that hard...