I get asked this question a bit. I used to find the question annoying. For me this question implies that the person asking the question thinks all photography is the same, that all photographers have the same needs, and that photography is a pursuit made easy with just the right equipment. Outside of a flippant, the best camera is the one that's with you response I would try to avoid answering. Partly because I didn't want to get into a discussion about learning photography and partly because I really don't know what's best for anyone except me.
But while ruminating on this question this morning while driving to work, I think I found an answer that will help the questioner while also being instructive about photography. Getting upset about the question belies the truth of why the person was asking the question. There is so much information on the web, they don't understand much if it, and they wanted an "experts" advice. I'm not an expert but when I frame the question in that context I don't feel the annoyance. So what's the best camera.
The best camera is the one that fits into your budget. Seriously. Modern digital cameras are so good and have so many features that any of them will be sufficient for the novice photographer. I don't think there is any meaningful difference between a Nikon, Canon, Sony or Fuji. All of these camera brands make excellent cameras. The main difference in price level can be mostly be attributed to features that will only matter to an advanced amateur or professional. For beginners the Nikon D3300 will suffice for many years. Even longer if the photographer has no interest in developing more advanced skills.
What lens should you get? That depends on what you want to photograph. For landscapes you'll want a wide-angle lens. For portraits you'll want a portrait lens. Most people asking the question that started this post don't know what they want to do. Most likely they want to take some pictures of family or a trip to a historic scene etc. A good general purpose lens with a focal length of a 24-70 f/4 lens. I recommended crop-sensor cameras above. The crop-sensor version will be a 16-50mm lens. Most of the entry-level cameras will come with a kit lens, usually an 18-55mm f/3.5-5.6 lens, that will meet the needs of the beginner.
Should I get a DSLR or a mirrorless camera? Do have friends with a Nikon and want to be able to borrow their lenses? If yes, then get the same brand of camera as your friends. If you want to carry lighter equipment, if you want a camera that easy fit in a backpack, then get a mirroless camera. The lighter ones are the in the micro 4⁄3 format. Other than weight, there is not need to care about DSLR versus mirrorless. You'll get excellent results from both.
What about megapixel? They don't matter. The haven't mattered for a while. Most people are taking photos to share online, either on a blog, or on social media like Facebook. Facebook and many social platforms limit the size of the image you can upload. It's a lot lower than the 8 megapixel camera in the iPhone. My research indicates that most people are viewing their images on portable screens on their smartphones and tablets. These devices have screens that can't display more than 2-3 megapixel. So what's the point of having a 36 megapixel camera if you are uploading the images to Facebook to be seen by someone using a 3 megapixel screen?
But what about prints? When was the last time you made a print? Will buying a multi-megapixel digital camera make you want to make more prints? I doubt it. And even if you do, 8 megapixel is enough to make the 4x6" and 8x10" prints. Since the most bare bones modern digital camera has at least 12 megapixel, you will have enough resolution to make 16x20" prints. So stop talking about megapixel.
Set your budget, buy a camera, and start taking photos. Or maybe your smart phone is all you need.