This will likely depend on which statistics organisation you ask - but the current de facto organisation for sporting stats is probably Opta.
According to Opta, an assist is not awarded when an own goal is scored. This is described in their Event Definitions:
The final touch (pass, pass-cum-shot or any other touch) leading to the recipient of the ball scoring a goal. If the final touch (as defined in bold) is deflected by an opposition player, the initiator is only given a goal assist if the receiving player was likely to receive the ball without the deflection having taken place. Own goals, directly taken free kicks, direct corner goals and penalties do not get an assist awarded.
As an aside, it may be a point of discussion if the conversation is relating to fantasy football leagues. For example, in FPL (Fantasy Premier League) an assist is awarded if the shot (or pass to a would-be goalscorer) is deflected into the goal and an own goal is given. Though this may not be the case in other Fantasy leagues.
As a concrete example - during Chelsea's 7-0 win over Norwich in the 2021/22 season, Callum Hudson-Odoi was awarded (in FPL) an assist and the 2 fantasy points for the cross he made into the box, which was ultimately deflected into the goal and given as a Max Aarons own goal.