I know there is 祖父母, but that's only paternal grandparents. Is there a word that the encompasses grandparents from either side or together?
Unlike brothers; sisters (兄弟; 姐妹), Chinese don't have a collective word for 祖父母 (grandparents from father's side) and 外祖父母 (grandparents from mother's side)
If you had to write grandparents and didn't know if there are maternal or paternal grandparents, you can write 父母的父母 (the parents of one's parents), which encompasses one's all four grandparents
We do have a collective word 祖輩 for 'ancestors' and great grandparents are included in this term so you don't have to write 父母的父母的父母 for it
祖父輩 (Grandfather's generation) encompasses the whole generation, which includes grandparents and granduncles
There is no formal word that encompasses grandparents from either side or together, but no one will complain if you use 祖父母 to refer to both sides. If anyone does complain, then tell them that you feel that it's sexism to differentiate paternal and maternal relatives or any other reason you can think of.