How to share a 4G data connection over wired Ethernet?
While the feature has never been part of stock Android (not sure if some custom ROM provides this), it's possible on rooted devices.
I recently answered to How to make Ethernet work on Android over OTG? which may help you make Ethernet work on your device. Once done, there are two more things required:

Run a DHCP server (we already have dnsmasq on device up to Android 9, or you may get a static binary)
Share internet (by doing IP forwarding and NATing)

Both of these steps are explained in my answer to How to create a WiFi hotspot from the terminal? and the answers linked there. Just ignore the steps related to WiFi and pick the relevant parts.