Well, actually in our times, the first step is to "run a search for it".
https://github.com/dom96/nimkernel
;)
What are all the steps for writing an operating system from scratch in Nim language?
Sorry, but you can't really expect us to write a complete tutorial on how to achieve this :)
Best resource is the OS dev wiki and nimkernel (linked above).