The most secure method is to adjust the valves on a cylinder that is on it's compression stroke. Pull the plugs, and turn the engine by hand. You can use the Very High Tech Tool to find the compression stroke. It is known as your finger... Any finger will do. Just feel for the compression and that will guarantee both valves are completely closed.
BTW, everyone starts at zero experience. It is always good to ask the question. Easier than fixing a mistake.
I started asking questions, of my Dad, around 1958 or so... I am still asking questions and I hope to be asking questions for a time.
There are alternative methods that have you adjust cylinder "X" valves when cylinder "Y" has an intake open. But the upshot is that in both the text book method and my method, the target cylinder is on a compression stroke.
Try working on an engine where the manufacturer want the vales adjusted with it idling. Now there is a fun afternoon. Or, take the classic Jaguar engine whereby you adjust the vale clearance by removing the cams. Yup, remove the cams. The cam operates directly on top of the valve and the "cam follower" is a bucket with shims between the underside of the bucket and the valve stem. You start by taking the measurements of all of the existing clearances. Jot them down and then remove the cams. You then remove the bucket and the shim pack from each valve, measure it, add/subtract the required shims, reinstall the buckets, reinstall the cams and then measure. If you made a mistake anywhere, you get to do it again. Come to think of it Ferrari's adjust the same way but at least you don't have to pull the cams...
Makes our valve adjust prodeedure look like a walk in the park...
For those wondering, the accepted method for hydraulic lifters in the 60's was to have a spare valve cover on hand that had the top cut out of it. You install the cover and put clips on the rocker (actuall these can be make out of aluminium foil) at the pushrod end so the oil does not go all over everything. Then, starting at the front cylinder, you loosen the adjuster so that the valve clatters, slowly tighten it up until it just stops clattering (zero lash) and then make the prescribed adjustment. Set the lock and move to the next valve. Afterwards, new gasket and the proper cover installation. All done, of course, with the engine at operating temperature. Very old school. Not for the inexperienced either. This is not a slam on anyone, you just have to see it done prior to attempting it.
Best method? Maybe not, but it removes a ton of variables the biggest being the charge state of the lifter. I belong to the "make sure the lifter is pumped up" crowd. So, when installing a new cam/lifter I precharge the lifters in a oil prior to installing them.