One document or many?
Embed related data when read together and bounded in size (order + line items). Reference when data is large, shared, or changes independently (user profile).
Quirk: The 16MB document limit is real. Embed a comment thread with 50,000 replies and learn the hard way.
Output
Press Run to execute your code.