Try the custom AI to help you find products that Reddit loves.
I'd start with a book (or books) on building code. There are some great illustrated manuals these days--example: https://www.amazon.com/Code-Check-Illustrated-Guide-Building/dp/1631869027/ref=sr_1_8?dchild=1&keywords=building+codes+illustrated&qid=1594758567&sr=8-8. This will show you what is required and many will give a little detail as to why. From there you can take what is required and adapt it to your personal building situation--where you want outlets, where you want switches, where you want sinks/toilets, and so on. Good luck with your learning!
I think I read a code about that. I don't have my book with me to verify. For basic codes for a variety of things this is a handy reference to have:
Code Check: An Illustrated Guide to Building a Safe House https://www.amazon.com/dp/1631869027