Countersink for an M2 bolt
You want the diameter of the countersink bit to be at least slightly larger than the screw head. Larger is OK, for wood, larger bits don't cost much more. You then drill until the V-shape is slightly larger than the screw head. If I am drilling a lot of them on a drill press, I set the depth stop. If drilling by hand, I drill a little, then I test the depth by putting the screw head into the hole upside-down. If it is important for it to be exactly flush, work slowly.

Ideally the chamfer angle of the bit should be equal to the screw head angle. But for your application it isn't critical. My local home store only has 82 degree chamfer bits, this is close to the angle of most common flat-head screws.

 

https://www.homedepot.com/p/RYOBI-5-8-in-High-Speed-Steel-Countersink-A10CS82/205469295