Hi mate.
I can only talk from my experiences.
When I trained for my first marathon, I developed all kinds of sprains and strains - Achilles / calves / shin splints.
From what I read, it’s your legs adjusting to the increased distance of your runs.
It’s a difficult one, as you need to train, but training causes al these niggles, so what do you do ?
However all is not lost, as you’ve got plenty of time until Edinburgh in 2024.
Have a look at your training plan and maybe wind it back a bit, so your increasing your distances slowly and in increments.
As has been mentioned, shoes can make a big difference too and as much as it’s tempting, try not to run your shoes to death, as they lose their cushioning and the impact can cause all kinds.
I’ve been using Hoka for years now and I swear by them, but it‘s what suits your feet and can be real trial and error.
I used to buy cheap used ones off ebay, give them a run out and if I liked them, I’d go out a buy a new pair - saves a lot of money.