The Datetime Range module provides a new field type, 'daterange'. The field is a plugin with provides the Item and List, the Widgets, and the Formatters.
The Item and List are what get actually attached to an entity, either as a base field or a configurable field.
The Widget is what gets used on the entity edit form.
The Formatters get used whenever the field is output, either as part of the parent entity itself or as part of a view.
Note I mentioned entities and not forms. The Datetime Range module does not provide any new form elements. The Widgets themselves are built around the core 'datetime' and 'datelist' elements (which really have nothing to do with the Datetime module; yes this is seriously confusing).
So, if you have a custom form and want a date range, you are going to have to build this yourself with two 'datetime' elements, and then have some validation rules to make this behave the way you want.
'#type' => 'date'
elements on your own, one for the start date, one for the end date, and then pick them up in your form submit handler. – leymannx Nov 12 '20 at 10:43