I used to suffer with this really badly, my GP suggested I start doing memory games - memory cards, memory boardgames and such. I actually got the Nintendo DS for the memory game it has. Training your memory seriously helps. I suppose it's like anything on the body - if you don't use it then it'll get weak.
Of course, like everyone else said you probably should go get an MRI scan just in case because early onset dementia is a thing. Luckily for me I was just really bad at remembering stuff but now I am far better, not perfect but I function and that's what is important.
If you're struggling with stuff in a job though - I would suggest set alarms on your phone for various things that need doing, write stuff down as well, I normally write important stuff on my hand.