I mean, just run?
Do 5ks till they're easy, then 10ks, then 20ks which are essentially "half marathons" since a marathon is ~43ks.
So basically, when you run a 20k, a 5k, and then another 20k back to back to back.
You're ready for a marathon.
If you're not a runner and you're trying to run a marathon, you're gonna give yourself shin splints and likely something even worse. Your body will adapt to those muscular skeletal stress, if it can adapt slowly you'll be better off. If it has to adapt too quickly it will fuck it up.
Like "shin spints" sound like they're not a big deal, but it's your muscles/tendons causing microfractures because your bones aren't strong enough. Try to "push thru" and you get real stress fractures, because bone grows slower than muscles and tendons.
If you really need to improve fast and no one can talk you out of it: run on soft grass as much as possible, or at least a real track. Avoid concrete and compacted running trails at all costs.