Related to your query, I suggest you follow https://machinelearningmastery.com/how-to-configure-the-number-of-layers-and-nodes-in-a-neural-network/ and https://towardsdatascience.com/first-neural-network-for-beginners-explained-with-code-4cfd37e06eaf