RDS deployment using Server Manager — Add roles and features — RDS install — Quick/Standard — Session-based you would set the licensing mode and RD Licensing server name in RDS Deployment Properties and make sure the server is part of a session collection.
If you do not create a RDS deployment then you can set it via group policy settings. For example, open gpedit.msc:
Computer Configuration\ Administrative Templates\ Windows Components\ Remote Desktop Services\ Remote Desktop Session Host\ Licensing
Use the specified Remote Desktop license servers Enabled
Set the Remote Desktop licensing mode Enabled