First the set rule for the numbering does not work, because Typst doesn’t allow a set rule inside a show rule for the same element, e.g. #show heading: it => {set heading(...)}. You need to use a show-set rule, #show heading.where(level: 1): set heading(numbering: "1.").
Second inside the show rule you use it.body which extracts only the heading body, so the numbering isn’t shown anymore. You have use the complete heading, upper(it).
Third, your set align(center) does only apply to elements after it, you have to set the center alignment then place the element (it).
I would recommend to use show-set rules where possible, as they can be overwritten later.
#show heading.where(level: 1): set heading(numbering: "1.")
#show heading.where(level: 1): set block(spacing: 1em)
#show heading.where(level: 1): set text(size: 12pt, weight: "bold")
#show heading.where(level: 1): upper
#show heading.where(level: 1): set align(center)
#show heading.where(level: 2): set heading(numbering: "1.")
#show heading.where(level: 2): set block(above: 1em, below: 0.5em)
#show heading.where(level: 2): set text(size: 9pt, weight: "bold")
#show heading.where(level: 2): upper
#show heading.where(level: 2): set align(center)
= Heading1
== Heading2