See the thread about moving to RPi 4 and updating to OH4: Openhab3 buster x86 -> raspberry pi bullseye+, how?
Additional information: Started with RPi4 2 G. This did not allow influxdb to start with the version mentioned above. I removed that and installed influxdb from the distribution. This way I could get the system up and running. So I moved the data over. I found out, however, that the system was not very responsive. Openhab sometimes took up to 30 minutes to startup completely. I read somewhere that influxdb/grafana require quite a lot of memory so I ordered an RPi4 8G, which I installed yesterday. Now Openhab boots much faster compared to the 2G version.
Hope that helps