Hi!
Study habits can often be a hard thing to incorporate into your lifestyle, so i definitely see where you're struggling.
Try making a study schedule. It helps to have a piece of time set aside a few times per week just for studying.
It also helps to have a friend to study with you. They can make tests for you on the material, help you review your notes, and having someone who is depending on you studying with them helps a lot.
Also, studying is not just about cramming everything into your brain. You need to be studying regularly, not starting to review your notes a day before a big test.
Lastly, it's important to remember to have a good study environment. I usually study anywhere from 1-3 hours. Take breaks every half hour or so. Get some water, a snack, and make sure you're comfy. If music doesn't distract you, put on some video game soundtracks. These soundtracks are designed to help you engage and focus and can be really useful, just make sure the music isn't too upbeat and loud.
Hope this helps, good luck :)