The ideal depth for raised beds can vary based on what you're planting and the type of soil in your area. However, a general recommendation is a depth of at least 6 to 12 inches for most plants.
For root vegetables like carrots or potatoes, a deeper bed, around 12 to 18 inches or more, might be preferable to allow for adequate root growth.
If you're growing shallow-rooted plants like lettuce or herbs, a depth of 6 to 8 inches could suffice.
In essence, consider the root depth of the plants you intend to grow and aim for a raised bed depth that accommodates their needs while providing sufficient soil volume for healthy growth.