When a user creates an account they provide a seed phrase, and this can be used to generate a hierarchical deterministic (HD) wallet.
Makes no sense; you want to build such a system based on a database. Just store the total number of owned BTC per user, or alternatively store each purchase and add them on the fly whenever they fetch their balance.
I then will acquire Bitcoin for the user (not sure how this part will be done yet), generate a public key from the HD wallet, and send the Bitcoin to this. I wont save the private key [emphasis mine] or the seed phrase since I can later, if they would like to withdraw, generate the private keys for the users wallet from the seed phrase they provide (as far as I understand).
This makes no sense, either. You do need to store keys on your server in one way or another; whenever a user wants to withdraw, you use those to create a Bitcoin transaction that spends up to the user's balance and sends it to the address they specify.
A user should
never be asked to send you their seed phrase, because at that point you will own
all of their private keys, even though you don't need them just to send them Bitcoin. You just need a single address.