I need to make some minor modifications to the kernel, but want to run PureOS. What's the easiest way to do that?

Good question, I too would like to know the answer.

For Librem 5 there is this thread:

For x86_64 I suppose it should work in the same way, except I don’t know where to get the source code in that case. (For the Librem 5 the kernel source code is here: Librem5 / linux · GitLab)

As far as I can tell, the PureOS repos at PureOS · GitLab do not include the kernel which I think means that PureOS uses some standard Debian kernel for which we should be able to get the source code from Debian somehow. But I don’t know how. Of course there is the mainline kernel source code from kernel.org but that does not tell us anything about the configuration used for PureOS and how to make it a deb package of a kind that would work for PureOS.

On my Librem 14, under /boot/ there are files called “config-” with different version numbers that contain kernel configuration options, so that’s something.