so in the opening crawl it says that Luke has disappeared, and that Leia and the First Order are looking for him. we are then later told that Luke vanished because he failed when Ben Solo(Kylo Ren) went full FEDORA EDGELORD. Luke feels responsible for Ben's fall to the dark side. so what does he do? does he go after Kylo Ren, turn him back to the light side or destroy him and the First Order? NO. instead of rectifying his mistake, he runs away and hides in some obscure corner of the galaxy. Luke Skywalker is now completely ruined.
the Resistance, now led by General Leia Organa, is looking for Luke so that he can help restore peace and order in the galaxy. you have to wonder what these chucklef---- have been doing all this time. they can't just rely on Luke to save the day every time, they should've made their own defensive measures against any threats. maybe make their own Death Star.
now the First Order. they're looking for Luke too. what a bunch of knuckleheads. instead of wasting time and resources looking for Luke, they should just make Luke come to them and let the Resistance do their work for them. meanwhile they can make the Republic submit to their will by using the third Death Star to destroy all pro-Republic systems. and by the time the Resistance has found Luke, it would be too late. but nah, they decided to look for Luke too, which eventually led to the predictable destruction of the third Death Star and their defeat. good job, idiots.
they either could have just had the Death Star be the McGuffin where Poe is trying to discover its location and Kylo comes after him to keep him from spilling the beans on the base' coordinates. as for Luke, they can just say he disappeared 20 years ago for who knows what reason, maybe he felt a disturbance in the Force and sought to uncover it. or maybe he wants to be the last of the Jedi/Force users and so he went into seclusion. and Kylo doesn't really need to have a master-apprentice connection with Luke, just say that he was a force sensitive child who idolized his uncle, but was frustrated because he has no one to teach him its ways. then Snoke appears and takes him away from Han and Leia, and is taught the Force and the dark side.
it seems to me that not a lot of effort was put into writing the story, but maybe because in this day and age you don't have to. people will eat anything up as long as it doesn't have Mila Kunis and Chaning Tatum.