Most Cameras today have around 20-24 Megapixels. But the Trend seems to go up to and beyond the 40 Megapixel mark. But is that all really necessary? My Opinion might surprise you.
As with all Things Photography related, there is no clear Answer to the Resolution Question. It off course all depends on what you want to do with your Fotos.

I absolutely do love it to be able to Crop into my Fotos, but I usually try to get my Composition as good as I can in Camera. And this is where a higher Resolution can really help.
It plainly gives you more Cropping Leverage to have a really high Pixel Count. You can go in deeper without loosing much Quality, but only if your Lenses actually can deliver that Quality.
In my Opinion, 20 Megapixels are enough for pretty much any possible Application, even huge Prints. So you can definitely do more with 45 Megapixels then with 24. But everything comes at a Cost.

The higher your Resolution, the bigger you can Print, right? Well, not necessarily. It again all depends on the Glass.
Also, you probably would not hold a Billboard sized Print in your Hands. Instead, you would probably look at it from afar. And at a Distance, huge Pixel Counts do not make much of a difference.
In Fact, most Billboards are Printed at a very low Resolution because they are meant to be looked at from a Distance. Not with your Nose right next to them.

High Resolutions also have their Downsides though. File Sizes can be really huge for Example, especially if you shoot in RAW. And I always shoot RAW. It gives me more Control in Post.
Those File Sizes also take a Toll on Shooting Speeds. Cameras need to write the Data they Capture to whatever kind of Storage Medium they use. And that is a real Bottleneck. Buffering really can take all the fun out of Photography.
Also, your Storage fills up quicker when your Files are Huge. But SD Cards are quite inexpensive, and you can just carry around more of them.

Physics dictate that a larger Area can Capture more Light. Off Course that also holds true for Camera Sensors. 45 Megapixels on a Full Frame Sensor will obviously result in smaller Pixels than you would find on a 20 Megapixel Sensor.
That means that the larger Pixels of the lower Resolution Sensor can Capture more Light. And that, in Theory, makes the Camera better in Low Light Situations.
When the Camera has more light available to Process, it can use a lower ISO. Also, again in Theory, Noise at higher ISOs should be slightly lower, because again, there is more Light available to be processed.

Over all, I really do not Care much about how many Megapixels a Foto might have. I usually Export with a 3000 x 2000 Resolution, or 6 Megapixels, anyways. And that is usually enough for everything I do.
I have never received any complaint about the Resolution of my Prints or Postcards. And I doubt I ever will.
Also, my Dream Camera right now, the EOS R6, would actually be a Step back in that Field, from 24 down to 20 Megapixels. But that Camera is pretty much better than my M5 in every other way. Also, it is Full Frame versus APS-C. But I will not get into that for now.
