We can buy bitcoins (or satoshis) even on an online exchange but we should never keep our funds firm on it.
The reason is quite simple: we do not have the private key of our wallet on the exchange, since this provides us with a custodial wallet. Imagine that you want to convert euros into dollars: would you trust to leave your money at the local exchange after converting them?
To better understand the dangers of not having your own funds directly using the private key, I invite you to read the chapter Has anyone ever stolen bitcoins from the system?
So let's use the exchange for the purchase of satoshis and the temporary maintenance of them, if we wanted to use it to do trading activities, but remember that it does NOT provide a non-custodial wallet!