For most four-stroke engines, the valve simply closes as the spring returns. As the engine speed increases, the time that the spring pushes the valve to open and close will change, and this time change is not conducive to the performance of the engine.
One solution to this problem is to control the Desmodromic valve speed control system. This system uses a mechanical device to adjust the opening and closing of the valve. This will give you a higher speed engine.
The disadvantage of this system is its high complexity and high cost, and some manufacturers use it in the Ducati system for motorcycle engines.