It should be possible with rules. What have you researched & tried?
We are here to help you configure & understand your system. We do not have the volunteer resources to provide & support complete solutions. The expire binding could be used with a delay timer Item switch.
But the openHAB documentation tells you how to create openHAB rules. They would work the same if you ran openHAB on Windows. There is no such thing as a user to “code Linux”
You should not helplessly use an OS you do not understand except for learning about it. OpenHAB is primarily developed on Linux and macOS though.
Since you’re not configuring with rules at the moment, it sounds like your openHAB is not currently managing any linkage between say motion sensing and light.
If it’s not managing that, then it’s not managing that, and you will not be able to change the way it is managed by date.
openHAB is perfectly capable of doing what you ask, but you would need to use more features of openHAB.
While it’s certainly beneficial to get up to speed on rules coding, you could get along without by using the expire binding. Then again to make use of its full potential you would need to add some simple rules nonetheless.