From the feedback on ILM docs session, I'm not sure to what extent this is already documented, so this may just be a matter of confirming that the procedure is already clear in the docs.
Serverless doesn't have ILM; uses data streams. Typical steps are:
- Add System integration.
- Fill in fields.
- Install agent.
- Agent creates the data stream.
- Data stream uses index template.
- Index template has the “Data retention” enable setting.