This is how I do it:
1. I first create an html file on my computer and a css file. I link them together and create the basic, basic structure of the theme with the basic divs like title area, post area, sidebar just to test without having to worry about mixing it with php code.
2. I grab a new copy of a skeleton theme. I’ve used this one several times: https://starkerstheme.com/
3. Ditch the themes css file except for the comment info stuff, drop in your CSS file
4. go to the php files add in your divs, etc etc etc
You may have to comment out some code in the functions.php file of Starkers to get galleries to display properly.
I find it more convenient to develop offline with MAMP or if you have windows its called something else.
https://www.mamp.info/en/index.html
otherwise yep, use the codex or google to get the specifics on using all the template tags and functions properly as you go along.
if you use mamp use console to keep a live watch on the php_error.log file as it spits out your errors automatically as it happens including line numbers!
i can also recommend the book ‘professional wordpress design and development’ as a good ebook. use it that a lot too.