Step 1
You invent guitar riff and record it using metronome built in DAW
Step 2
Edit your mistakes, like little errors or tempo
Step 3
Find sound for your guitar, add distortion
Step 4
Add other instruments, create melodies for them, add drums(Kontakt VSTs)
Step 5
Make your instruments sound not like shit, I use Valhalla Shimmer VST for reverberation and Soothe 2 VST for decreasing resonance, also equalisation, etc
Step 6
master your track. I use Isotope Ozone 6 for this, it makes everything almost automatically