I filed my taxes under the wrong year! It did not electronically send as I had already done that year but now it is showing I owe a lot of money and that is wrong

I tried to file 2022 but filed it as 2021. Like I previously mentioned earlier it did not send it but it shows a huge balance and it carried over to my correct 2022 filing. What can I do?