There were loads of little branch lines up there at one point
Much of the coastal line of Elgin to Portsoy has been absorbed into the growing towns and villages, or reverted back to farm land.
From Elgin, following NC route 1, you can see some of the old railway bridges but there's not much to actually follow until you get out to Garmouth and the section over the Spey Viaduct. Then you've got several breaks and rejoins through Buckie to Cullen and Portsoy as NC1 and the coastal trail don't fully use all the accessible parts. (Either going closer to the coast or easier quiet roads)
I haven't been beyond Portsoy as the ice cream shop was the objective 😁
There's also a short branch line from Elgin to Lossiemouth, which can be followed past Spynie Castle.
The Speyside Way sections from Nethy Bridge to Grantown and Craganmore down to Craigellachie and the spur up to Dufftown is on the old railway lines.
The Dava Way follows the old old Forres to Grantown line, with only a couple of small diversions avoiding some boggy sections and the old Dava station which is now a house.