The first way is what I have done and bought one of the original Leica M8.2’s. These at base ISO are still very good. Then over the last few years look out for secondhand bargains for lens.
The other way requires a high initial outlay. The camera above is a Leica special edition. It’s the latest M-P in green, a limited edition box set with a lens and it’s cheaper then an M with this lens bought separately.
This being a special edition is likely to keep its value much better and you can sell it to a collector when you come to upgrade.