Engine cuts off rpm guage stays at zero when engine starts

When driving down the road the engine will feel like it sputters and the RPM gauge will drop to 0 even though I'm going 60 miles an hour. Then when I come to a stop the engine will die but will start right back up but the RPM gauge will stay at 0. I can still drive if it stays at 0 but it runs rough. If I turn it off sometimes the RPM gauge will fix itself after restarting it then will run fine for a few hours or for a few minutes. It only does it sometimes whether it is running temperature or cold. Any help would be appreciated. It is a 2013 Hyundai Elantra with 108000 miles on it.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0