MQTT is arguably the best way to get data from arduino to OH
See this thread:
That’s for OH and the mqtt broker installation
On the arduino side, you need to use the pubsubclient library (Other flavours available). It is available in the arduino IDE library downloads and comes with examples
Follows the link above especially the MQTT essentials to understand how MQTT works (Simple really)
Read the docs, read them again and when you have finished read them one more time.
Openhab MQTT binding doc:
https://docs.openhab.org/addons/bindings/mqtt1/readme.html
Good luck