Most people buy crypto on an exchange, a company that swaps dollars for coins. It is the easy way in, but the coins sit in the exchange's accounts, not yours. If the company is hacked, freezes withdrawals or collapses, customers can lose everything. That is what happened at FTX in November 2022, one of the largest exchanges in the world at the time.
The alternative is a wallet you control. A wallet does not hold coins; it holds the private key that proves the coins on the blockchain are yours. That key is usually shown as a seed phrase of 12 or 24 words. Whoever has those words has the coins. This is the meaning of the saying 'not your keys, not your coins'.
Control brings responsibility. There is no password reset and no fraud department. Write the seed phrase on paper, keep it somewhere safe, and never type it into a website, save it in a photo, or send it to anyone. For larger amounts a hardware wallet keeps the key on a device that never touches the internet.
Either way, a few habits prevent most losses. Use a strong, unique password and an authenticator app for two-step login. Check the web address before signing in, because fake copies of real sites are common. Send a small test amount before a large transfer: a payment sent to the wrong address cannot be recalled.