How can i download the opencl header 2.1 or 2.2 from offical

how can i download the opencl header 2.1 or 2.2 from offical, i see header are 3.0 in github

I assume you want to ensure that you are not accidentally using features from newer OpenCL versions? In that case, see Compiling for a Specific OpenCL Version in the OpenCL-Headers repo’s readme file.

If the opencl header provided by the vendor is 3.0, how do I know which version of opencl I can use?If the vendor only implements opencl 1.2, should it only provide the 1.2 header instead of the 3.0 header?

The header does not tell you what version of OpenCL is available at runtime - after all the application might be run on a completely different machine than what was used at build time.
You use clGetDeviceInfo with argument CL_DEVICE_VERSION to find out what is available at runtime.