what i do is that i always keep an emergency money in the bank with my bank card so it is always at hand for cases of emergency and each month i deduct my expenses and spend that money and if by any chance there is anything left over i would invest it , most probably in bitcoin.
Congrats for having an emergency fund. We all must have that rainy-day-fund to save us from trouble when bad situations happen. But the process you do to come up with the money for investment is backwards. You should figure an amount you need to save for investment, then deduct that to your salary and put it somewhere else. The remaining money will be budgeted for you expenses. If you priorities expenses, you will mostly end up nothing for investments.