is it permissible to offer a prayer multiple times in case of doubt? I heard we can't offer maghrib prayer thrice? Is it true?

There are twenty-three types of doubt in prayers; eight of these invalidate prayers, six of them must be dismissed, and nine are valid.
Please refer the link below you find what to do in case of any type of doubt occurs in namaz.
Make sure in all cases of doubts we can’t repeat our Namaz rather we can correct them or ignore them or we can repeat our namaz.