Do not invest more than you can afford
Why there is don't invest in trading? Trading doesn't need any investment. Trading isn't investment, which you only need to wait until your investment growing.
And don't forget, trading isn't a way to rich quick
What probably OP meant is to invest money as your capital in trading, that amount is the total amount you will use in your entire trading journey, so if you loss it, your journey is over and it's necessary to invest what you can afford only so you life would not stop there when you loss.