I wanted to do something silly as a side protect:to upgrade my raspberry pi(4) but i am extremely new to computer building and have know idea what size CPU the pi uses. Sorry for the stupid question.
Thankyou for your time.
The Raspberry Pi 4 uses the Broadcom BCM2711 "system on a chip" (SoC) processor. This processor contains a quad-core Cortex-A57 64-bit ARMv8 at it's heart and then all of the circuitry needed to provide the GPIO, UART etc interfaces.
This is a surface mounted chip that - as far as I know - is not sold in small quantities to retail, it's strictly OEM only. So even if you were confident at unsoldering and remounting it, it's unlikely that you could get hold of a newer version of the CPU.
I suspect you need to think of a new project therefore. Sorry.
The easiest and cheapest way to upgrade a pi is to buy another one.
The "size" of the cpu is probably the least important feature you need to know when picking a replacement part. You could replace any size cpu with any other size by making an adapter board. The real issue is that the pin mapping has to also work and it has to have the same functions.
Basically, you'd have to replace it with a cpu from the same family that happened to be nearly identical. Since they don't sell these cpus to individuals, the easiest way to get one would be to buy another pi... which is where I started this.
The raspberry pi is basically a circuit board built around a cpu. The cpu is one of the most expensive parts (if not the most expensive part) on the board. So replacing the cpu doesn't make a lot of sense. You would be better off designing a new circuit board around a different cpu than trying to put a different cpu on the same board.