Are there any examples of groups, $G$, such that $|G|=p^aq^b$ (where $p$ and $q$ are distinct primes and $a,b\geq 1$) and $|\mathrm{Z}(G)|=p^a$?
($\mathrm{Z}(G)$ denotes the center of $G$)
I tried seeing if such a group could be constructed by a more general method - by taking the direct product of two groups, $X$ and $Y$, where $|X|=p^a$, $|Y|=q^b$, and $X$ is abelian.
But, of course, $\mathrm{Z}(X\times Y)=\mathrm{Z}(X)\times\mathrm{Z}(Y)$, and since $|Y|$ is a prime power, $Y$ must have a non-trivial center, meaning that $|\mathrm{Z}(X\times Y)|$ will always be some multiple of $p^a$ rather than just $p^a$.
I also looked at some small groups, but I couldn't find any example (because most were Dihedral or Dicyclic groups with trivial/ near-trivial centers).
(I am aware of Burnside theorem, but I can't figure out anything substantive from it in this situation)
Attempt by using the guide given by Tobias Kildetoft:
Suppose that $|Z(G)|=p^a$.
Note that $Z(G)$ is a Sylow $p$-subgroup of $G$, hence I denote it by $P$.
By Sylow First Theorem, there is a Sylow $q$-subgroup $Q$.
By Product Formula, $G=PQ$. And clearly $P\cap Q=1$.
And since $P=Z(G)$, $P\le N_G(Q)$. Hence $G=N_G(Q)$ which claims that $Q\lhd G$.
These show that $$G=P\times Q$$ Thus $$Z(G)=Z(P)\times Z(Q)$$ Since $Q$ is a $q$-group, $Z(Q)\neq 1$. Hence $|Z(G)|\ne p^a$, a contradiction.