Do I have to do KYC?

Hi. He plans to set up an account on the stock exchange and buy some cryptocurrencies, starting with bitcoin. Wherever I try to open an account, the information about KYC is always displayed. Did you have that too? What is this all about? What is all this KYC? They always ask for a scan of an ID or passport. How safe is it and is there any way around it or is it immediate? Thank you in advance for your answer