Must is a modal verb. Modal verbs do not change in form to make different tenses. Both your examples are fine, but they are using different verbs. 'Must' and 'had to' are not irregular forms of the same verb.
WeOf course, as auxiliary verbs, modals are used alongside another verb which most likely will have different forms. So, for example, if you say "you must do [x]should go" to mean that, retrospectively you might say "shouldyou should have gone do".
'Must' is used differently to 'should'. We use 'should' for actions or responsibilities that thing inwe think are best for the futureconcerned subject. Looking back, you can only say if they didWe use 'must' things that are considered *compulsory or did notnecessary do it. IfFor this reason, we don't use 'must' to say that someone didn't doought to have done something they were told theyin the past must do,- we would usually just say that they should have done it, but that is not a different participle of to fulfil their compulsory obligation. When we do use 'must' about something in the same verb because nothing has actually been donepast it is to express disbelief that it wasn't done.