Technically, Categories can be added anywhere within the body of the text. And they will always APPEAR at the top in the normal view. Templates, however, appear wherever you place them in the text. So it’s important to know where they’re supposed to go. So if a given template is supposed to be above the == Biography == header, it doesn’t matter if it comes before or after the categories. The categories will always appear above the template in the normal view.
So:
{{PGM}}
[[Category:blah blah]]
== Biography ==
Will result in the same display as
[[Category:blah blah]]
{{PGM}}
== Biography ==