Can you continue your studies in the same university after undergrad?

So I will be studying econ in Berkeley and I was wondering, if I wanted to stay in Berkeley could I just simply transfer without officially applying to their graduate school?

Generally, no.

Graduate schools are completely separate, unless you were specifically admitted to a joint program. You need to apply. In some academic fields there might be an advantage to knowing faculty within your department, but I’ve never heard of a “simple transfer.” If you qualify, you can probably take some graduate classes as an undergraduate, but you would still have to follow the standard protocols for graduate admissions.