So is the 8051 obsolete now? Or should I learn ARM?
A lot of its descendants are still in use.
Which to learn or use depends on what you are trying to do?
ARM CPUs/MCUs are now exclusively in surface-mount packages, from what I can find. That means you have to buy a PCB module with the CPU etc. attached, such as a Raspberry Pi.
PIC MCUs are also available as conventional dual in line ICs, so if you want to build around an IC rather than a board, they are a good choice.
We presently use the DSPIC33 series on a few designs, though we used a lot of the older, smaller ones in the past.
eg. the DSPIC33EP256MC502 is a 28 pin device with 32K RAM and 256K Flash memory for program storage.
Plus masses of built-in peripherals & 70 MHz clock speed, for something like 5.00 or less.
Or there are things such as ESP8266 / "NodeMCU" and similar, which have a fast processor and a WiFi interface, on a tiny PCB module. I've not used those yet but they are very popular with some other users in here.