Pine boards used for raised garden beds
Termites like soft wood, the softer the better. Pine, unfortunately, is a soft wood. Termites are attracted to wood that has been softened even more by water. You have several options to keep the wood dryer: https://extension.umd.edu/hgic/learn/materials-building-raised-beds
Builders and wood-workers also use borates to keep termites out of wood. We have info on that here: https://extension.umd.edu/sites/extension.umd.edu/files/_images/programs/hgic/Publications/non_HGIC_... You would have to read the label for any warnings about using near crops.