Succinctly put Data.define creates an immutable Struct type which can be initialized with either positional or keyword arguments

Source: New in Ruby 3.2 - Data.define - DEV Community