There is some research, e.g. this 2017 article. It begins by laying out some context:
After Mitt Romney’s defeat in 2012, 49 percent of
Republicans believed that the Democrat-leaning activist
group, ACORN, had stolen the election for Barack
Obama (only 6 percent of Democrats believed this). [...]
Such numbers could give the impression that Republicans
are prone to belief in election fraud; however, instances
where Democrats lose elections show parity. Following
the contentious presidential election of 2000, 31 percent
of Democrats believed that George W. Bush had stolen
the election (only 3 percent of Republicans agreed) [...]
I'm not aware of any studies that purport to address the most upvoted reason here, i.e. complexity of the system, or how much that would weight relative to other factors, but that piece also touches on the issue that fraud is sometimes mutually suspected, possibly when there are disputed technical issues (like the famous hanging chads)
With this said, belief in fraud is not just a symptom of
an election night hangover: belief in fraud is also widespread
prior to the announcement of an electoral outcome.
To take a high-profile example, during the protracted
recount in 2000, both parties were equally wary of fraud
prior to the announcement of a winner: 52 percent of
Republicans were either “not too confident” or “not at all
confident” that the recount process in Florida would be
fair; a similar number of Democrats, 47 percent, agreed
with them.
I cannot get here into too much of the methodological details of their study and regression model, because it goes on for multiple pages, but as teaser/nutshell they find that belief correlates with predisposition in conspiratorial thinking other areas

Our first two dependent
variables measure belief in fraud before and after the
election. In the preelection survey, we asked, “If [respondent’s
preferred candidate] does not win the presidential
election, how likely do you think election fraud will have
been involved?” In the postelection survey, we asked,
“How likely do you think election fraud was involved in
the outcome of the election?” Respondents could answer
both questions on a 4-point scale from very likely” to very
unlikely.” The first of these questions captures the dispositional
nature of fraud beliefs, while the latter captures
the situational nature because one party would have won
and the other lost.
These two variables are labeled Fraud if Lose and
Fraud Affect Outcome in Table 2. [...]
Our independent variable of note is labeled Conspiratorial
Predispositions. [...] This measure is an additive scale composed of
three items adapted from McClosky and Chong (1985).
“Much of our lives are being controlled by plots hatched
in secret places,” “Even though we live in a democracy, a
few people will always run things anyway,” and “The
people who really ‘run’ the country, are not known to the
voters.” Agreement with each statement was measured on
a 5-point scale running from strong agreement to strong
disagreement. We combined the responses and scaled
them from 0 to 1 so that 0 indicates minimal conspiratorial
ideation (strong disagreement with all three items)
and 1 indicates maximal conspiratorial predispositions
(strong agreement with all three items.) The scale has a
Cronbach’s alpha of .79. This measure is similar to other
measures currently used to tap conspiracy thinking
(Lantian et al. 2016; Uscinski et al. 2016; Uscinski and
Parent 2014).
To assess the validity of our conspiratorial predispositions
scale, we also asked respondents to select from a list
which groups they felt “work in secret against the rest of
us.” The list included “corporations and the rich,”
“Republicans or other conservative groups,” “Democrats
or other liberal groups,” “Communists and Socialists,”
“the government,” “Foreign countries,” “International
Organizations (e.g., United Nations, International
Monetary Fund, World Bank),” “the Freemasons, or some
other fraternal group,” “labor unions,” and “some other
group.” We expect that if our measure of conspiratorial
predispositions is valid, those higher on the conspiratorial
predispositions measure will identify more groups. A
bivariate negative binomial regression analysis indicates
exactly this: our conspiratorial thought measure is positively
correlated with the number of groups selected
(b = 316, p < .001). Substantively, an increase in the
predisposition measure from its minimum to its maximum
is correlated with an increase of about three groups.
[....] Trust is based on agreement with
the statement, “The government can be trusted most of
the time.” This variable ranges from 0 to 1, in 0.25 increments.
The correlation between conspiratorial predispositions
and distrust of government is only .24, suggesting
that even if conspiratorial predispositions are related to
trust in government, they are nonetheless distinct. If the
effects of conspiratorial predispositions remain significant
even when trust in government is included in our
models, this suggests that they have an effect on belief
about election fraud distinct from conventional trust measures. [...] Political Interest is self-reported interest in following political news, also coded from 0 to 1 in increments of one-third.
[...] Prior to the election, conspiratorial predispositions
strongly predict the belief that if one’s candidate were to
lose, fraud would have been involved. The magnitude of
this effect is substantial. [...] Our other key explanatory variable, party identification,
predicts little in this [first] model [column/model 1 in table 2]. It is worth noting that
the effect of Trust is significant and negative, signifying
that greater trust in government leads to less belief in
fraud. While the effects of trust are substantial—a shift
across the range of this variable leads to a predicted 18
percentage point shift in the belief in fraud—this is much
smaller than the effect of conspiratorial predispositions.
The second model in Table 2 addresses the belief that
fraud affected the outcome in the postelection survey
wave. Again, Conspiratorial Predispositions has a statistically
and substantively significant effect, though it is
smaller than in the preelection question. All else equal,
among strong Republicans, a move from the lowest to the
highest value results in a predicted 27 percentage point
increase across the two “agree” categories of the dependent
variable; among strong Democrats, the predicted
effect size is 14 points.
So yeah, there's a combination of general predisposition for conspiratorial thinking and (situational) motivated reasoning among the main drivers.
Although the authors of this study don't comment much on the [observed] correlation with the interest in following political news, it's probably fair to assume that if media is filled with such news of fraud allegations, it would maintain such beliefs over [a longer period of] time.
I suspect that "trust in government" correlates with trust in
the technical details of the election process, but I'm not sure if the degree of that linkage [belief] has been studied in detail.
There's also an open access 2022 paper that has some perhaps interesting historical analysis in re the US case, but otherwise doesn't add much to the
general issue, except perhaps to posit that [sustained] polarization may also play a role
For Republicans, the decline in 2020 was a continuation of a two-decade-long decline in confidence in the vote count, after an uncharacteristic uptick in 2018. For Democrats, the upward swing in confidence in 2020 was uncharacteristic of the steady pattern of the preceding two decades.
Perhaps the 2020 Democratic upswing was due to the euphoria over the victory of Joseph Biden over Donald Trump, but one must wonder whether Democrats’ responses to the confidence questions in 2020 were influenced by a strong negative repudiation of Trump’s calling the results of the election into question. At the very least, it bears underscoring that if the two parties diverged dramatically in how confident they are in the voting process, that divergence seems to be more affected by changes in Democratic responses than to changes among Republicans.