When you are building a tech product, selecting the right tech stack becomes extremely important for the success of the product. Techstack is the foundation of the product and it will influence the decisions that you will take in the future about future product direction and determines how your product and business around that product will scale.
If the product and the business around it is a building then your tech stack probably represents the foundation of that building. Extremely important to understand the various nuances of different tech stacks available in the market and selecting the one which makes perfect sense in your particular case.
There are lot of things that you need to keep in mind while selecting a tech stack for a product. First and foremost you need to figure out what kind of usage will your product will be subjected to when it is released. Is your product more read oriented or is it more write oriented? This will help you figure out what kind of database you should be using because some databases are more read friendly while some other databases are more write performant. Also you need to ask yourself the question what will be the structure of data and how will it be related and how it will evolve as the product matures. The scheme of your data will end up defining what database will work for your product within it be a relational database or a non relational data like mongo DB.
Then another consideration is the complexity of your product. If your product is a relatively simple CRUD application, then going with a solution which provides out of the box opinionated setup is the best option - eg Ruby on Rails. But if your app needs are complex, then going with a more modular approach based framework is a right option, such as node JS.
So you would have realise that selecting a tech stack is a hard thing to d, so do your research well before jumping off to build your product. Also if possible it is advisable that you consult experienced people who have been there and done that.