How did you modify the "sudoers" file originally? It sounds like you just used a regular text editor which is not the proper way of editing that file since the OS provides a special utility to edit that file. That special utility will make sure there are no syntax errors in the file when saving it.
Personally I would never edit the "sudoers" file even with that special utility because if you make a mistake it is very difficult to recover from it. It is much better to create a new file in the "/etc/sudoers.d" folder, so if something does go wrong, then you can just use the Finder to move/delete it.
To properly edit the "sudoers" file you need to use the following command which will allow you to use the "nano" text editor which is easier to use than the default "vi" or "vim" editors:
editor=nano sudo visudo
To fix this problem now, you will need to either replace the "sudoers" file from a backup, or edit it while booted from Recovery Mode. To edit it from recovery mode will require a slight modification to the above command as you will need to point the utility to the "sudoers" file which is located in another location when booted into Recovery Mode. You will need to find the mount point for the volume. I will provide an example command to where I believe the volume will be mounted (assuming the volume name is still the default "Macintosh HD" and "Macintosh HD - Data". I have never done this with macOS 10.15+ so you will need to figure out the exact path.
editor=nano visudo -f /<path-to-mounted-internal-volume>/private/etc/sudoers
I believe the correct path while in Recovery Mode will be the following, but you should verify it yourself (if you don't know how, then you should not be modifying the "sudoers" file in the first place -- I'm assuming the default "Macintosh HD" volume name has not been changed):
editor=nano visudo -f /Volumes/Macintosh\ HD\ -\ Data/private/etc/sudoers
Remove the changes you made and safe the file. Once you reboot normally, you should have your Terminal working again.
In the future create a new file in the "/etc/sudoers.d" folder for any customizations by using the following sample command (the special "visudo" command will make sure the file has the proper permissions as well as verifying the syntax of each line):
editor=nano visudo -f /etc/sudoers.d/<custom-sudoers-addon-file>
So, to give create a special entry on my system, I used "mymods" as the file name to house the custom "sudoers" information:
editor=nano visudo -f /etc/sudoers.d/mymods
This is a much safer way to make modifications. I suggest you perform a lot more research before following advice you find online (even mine since it is possible I have made a mistake or a typo -- it has been a while since I performed these modifications) and make sure you understand how this all works and possible repercussions. FYI, I never realized this myself until after doing research and finding people suggesting this option and also reading the "man" files for "sudoers" and "visudo". Also, backups are very important especially when working with the command line, even more so when "sudo" is involved.