If you have access to cedar or redwood, it is a little more rot-resistant than pine or fir, and still safe to use with food crops. Don't use pressure-treated wood.

Raised beds are easier to work, but they drain fast. If you have sandy soil, add lots of compost and some (unused) clumping cat litter. The cat litter is clay, which helps hold water and nutrients, just don't overdo it.

Sue