macbook pro restarting because of unexpected problems way too much
I have a mid-2017 13-inch MacBook Pro with a 2.3 GHz Intel Core i5 processor, currently on the Mojave 10.14.6 update and recently especially these last few weeks my MacBook has been restarting a lot. just today it restarted THREE times and if that isn't alarming then... it literally restarts at least once per day and it's always because of unexpected problems or just randomly restarts. it's also freezing up quite a bit which results in me restarting my MacBook. I've been unable to update to the newest update because I don't quite have the storage to update it. My laptop itself has barely any additional apps, whether from the app store or downloaded off chrome and I only really use it for school and watching shows. I have almost nothing on my laptop except for photos and a few textbooks from school so it's not really much to worry about but yeah just wondering if there is any way I can fix my laptop? or would it just be better to get a new one because I was planning on getting a new one in two years time when I start uni?
MacBook Pro 13″, macOS 10.14