Extracting serial data and display to 5digit 7segment

You can find a simulated example of this on Wokwi.