Mountain biking and road biking are very different and both have positives and negatives. When making the decision about it’s important to factor in a few things.
How likely are you to ride your bike on the road or through mountain, rough terrain trails. When I decided to buy my bike I didn’t what type of conditions I would want to use my bike. I liked the idea of both and wanted to really test both out. I decided to buy a hybrid bike which is not the best for road or mountain conditions but can handle both good enough. You can always sell that bike and get a mountain bike or road bike.
Consider your surroundings. If you live in the mountains and there are a lot of trails where a mountain bike would be preferred then buy a mountain bike. If you live in a city then a road bike is the better option. Do you have any trails that are really close by where you live? It’s usually the most convenient places to ride are the ones we choose the most often.
Are you going to ride roads and use the bike as your form of transportation? Then a road bike is the best option.
If you plan to do some serious riding and some long rides then also buy some good shoes, padded underwear or shorts and a nice biking jersey. This equipment will reduce pain and make riding more enjoyable. Find some nice trails and map out how far they are and how long it will take you to ride them.
Whichever decision you choose have fun and enjoy the ride!