Is it what you want ?

Then just set the color of HStack
var body: some View {
Form {
HStack {
TextField("Total Time in Minutes", text: $totalTime)
.background(Color.green)
TextField("Servings", text: $servings)
.background(Color.yellow)
.multilineTextAlignment(.trailing)
}
.background(Color.yellow)
}
}
If you want a lightgray separation,
extension Color {
static let lightGray = Color(red: 0.8, green: 0.8, blue: 0.8) // adapt to exact color you want
}
and set for HStack
.background(Color.lightGray)