Determining if auto stats update is in progress
SQL Server 2019 has introduced a wait stat to track this. On earlier versions, you're left to traces/XE. See my posts about the new wait stat: 


SQL Server 2019: WAIT_ON_SYNC_STATISTICS_REFRESH
SQL Server 2019: WAIT_ON_SYNC_STATISTICS_REFRESH Redux 


To use XE on prior versions, the event you want to look for is auto_stats. A bare minimum session to get you started would look like this:

CREATE EVENT SESSION auto_stats
    ON SERVER
    ADD EVENT sqlserver.auto_stats
    ADD TARGET package0.event_file
    ( SET filename = N'auto_stats' );


Though you'd probably want to configure it with some specificity to databases or tables that you care about, and I'd definitely want to filter on duration (WHERE [duration] &gt; 1000000 would be one second) or something, because it'd be pretty noisy otherwise.