Imbalanced classes present minimal problem to proper statistical methods.
A standard criticism of class imbalance is that it can result in models always or often classifying as the majority class. However, most models don’t actually do classification but output scores on a continuum, such as a logistic regression outputting probability. Software packages default to a cutoff threshold of $0.5$ probability, but this might be wildly inappropriate for your task (whether the classes are balanced or not). A simple approach is just to adjust the threshold. A more sophisticated approach would directly evaluate the probability outputs with a metric like log loss or Brier score (two examples of so-called “strictly proper scoring rules” that are uniquely minimized in expected value by the true probabilities, so they seek out the true probabilities of events).
This topic comes up so often on the statistics Stack, Cross Validated, that I have compiled a list of links to further reading about class imbalance and proper statistical methods that handle class imbalance.
https://stats.stackexchange.com/questions/357466
https://www.fharrell.com/post/class-damage/
https://www.fharrell.com/post/classification/
https://stats.stackexchange.com/a/359936/247274
https://stats.stackexchange.com/questions/464636/
https://stats.stackexchange.com/questions/558942/
https://stats.stackexchange.com/a/316114/247274
https://twitter.com/f2harrell/status/1062424969366462473?lang=en
(For those who do not know, Frank Harrell was the founding chair of Biostatistics at Vanderbilt University.)
We also have a Cross Validated Meta post that deals with this topic and links to other material (and a lot of the same material).