How can I effectively track my expenses?
I suspect you're being downvoted because you haven't given us enough details about what isn't working for you to offer anything but the absolutely standard description of budgeting:
Write down every purchase at the time you make it. And/or get receipts for every purchase and use those. And/or use a credit card which categorizes purchases, or where you can make a good enough guess from where the purchase occurred Transcribe into appropriate stylesheet or home financial program. Track the totals. Decide what you SHOULD be spending in each category such that it adds up to something you can afford. Work to control your spending to match that goal. Continue to track the totals. Repeat. Repeat. Repeat.
A few of the credit cards which do categorization will give you categorized subtotals on the statements, but that still doesn't address cash purchases or things where a single card purchase fits in several categories.