In general, it's easy to make the IR receiver working on RPi 4B using GPIO and IR sensor.
At first, you need to enable it - put this line to /flash/config.txt file (read only by default, remount as RW before edit):
dtoverlay=gpio-ir,gpio_pin=18
You may change the GPIO pin, GPIO 18 is a default when not specified.
Then connect the IR sensor's data pin to GPIO18, reboot the RPi and use ir-keytable to configure / map keys as described here: Infra-Red Remotes - LibreELEC.wiki
I already connected the sensor some time ago. I just didn't know about the config, which is now added.
Thanks!