Converted my oil burner to a gas burner and added an electric hot water heater. When i use the shower the hot water turns to luke warm in 12-15 minutes. It was installed by a professional plumber and he seems to be baffled by this problem.
That's how tanked water heaters work
Before, you had an oil fired water heater. There's no such thing directly, so you probably had an powerful oil fired boiler (hydronic) with enough power to heat the whole house, and as a side-feature, it had a water-water heat exchanger providing hot water. The demands of heating the house are much larger than just hot water, so it had the oomph to provide hot water continuously.
You changed to the cheapest option available, a tanked electric water heater, because the project had to hit a budget number. This is how those work.
Electric tanked water heaters have a tank of water. Typically 30 gallons sometimes larger, and typically 30 amps of electric. It takes 20-60 minutes for the tank to initially warm up. As you use the water, cold water must (law of physics) come in to replace it (the pressure of this water is what provides the flow). The 30A electric heater is not powerful enough to heat water at the rate a shower uses it. So the hot water is eventually used up. The heater needs 20-60 minutes to recover.
Getting 10-15 minutes of hot water would be about right for a low flow 2 GPM showerhead and a common 30 gallon tank.
You can go tankless
What you had before, with your hot water heat exchanger, was effectively a tankless heater because the fuel-fired heat source was so very powerful.
Since you converted the house to gas, you can get a gas tankless heater. Those can be plenty powerful and will do what you want.
Your other option is a tankless electric heater. However fuel is very powerful and it takes a lot of electricity to even compete. Don't be surprised if a "whole house" electric tankless heater large enough that will satisfy your needs will want 100A or more. That's just how much electricity it takes to heat water. It's unfortunately common for people to lowball their tankless electric requirement to either save money or due to electric capacity, and be unhappy with the lukewarm results at high flow. Such people inevitably declare "tankless electrics are junk" and give up, which is a shame.
However with electric, a "whole house" unit isn't necessarily the best plan. With no flues or drains, a tankless electric can go practically anywhere. You can site one right at the shower and have instant hot water. And since it's only serving the shower (and presumably the sink) it can be a smaller unit. Have another one under the kitchen sink to power the faucet, dishwasher etc (with a branch to the washing machine) and you are in good shape. You still need a lot of power.
Most water heaters are equipped with two elements which help it conserve energy. The upper or lower element only comes on when that area has cooled down, and both come on when the water is drained and new water mixes in. This helps to heat the water faster.
I am guessing one of your elements is not working. If it was installed within one year that's usually covered in the manufacturers warranty and under the installers warranty. I would contact the installer and have them check it out.
Sounds like a bad element. The upper element heats water as it's being used. The lower element helps maintain the temperature within the tank. It's also possible that you have a faulty thermostat.
It's also possible that your plumber connected the electric circuit incorrectly and your elements are not getting hot enough. That's why he is a plumber, not an electrician...