Since Azure (or AzureRM) module is marked as deprecated some years ago, AZ module is the official replacement to manage Azure resources with PowerShell.

This module is running with at least PowerShell 7.0.6 LTS (Long Term Support) or PowerShell 7.1.3, but higher versions are recommended.

When PowerShell from 1.0 to 5.1 are component of Windows operating systems, PowerShell 7 is cross-platform and is at top of .NET Core.
As a result, PowerShell Core has to be deployed on the environment to use this module.

If you try to use AZ module on Windows PowerShell, you will encounter the following error:

Indeed, I have not the recommended versions specified in the documentation:

For my example, I needed to install PowerShell core. To do so, I did an installation with an msi installer with PowerShell TLS release.
This kind of release only contains security fixes and servicing fixes to minimize the impact on Prod environments. They are of course included in Microsoft Lifecycle Policy.

NOTE: PowerShell 7.0 is no more supported, and only at least PowerShell 7.1 is now available.

After the my previous installation, here is the version I get:

This new module allows you to download only the necessary packages you need, which avoids having too much resources loaded in your PowerShell Console.

Keep in mind that executing Install-Module -Name AZ will install ALL packages:

In most cases, you will prefer only installing packages relative to Azure resources you want to manage.

In addition, using Import-Module -Name AZ will load all packages.
Here is an extract of the PowerShell Module Script associated to AZ module:

If you still have scripts running with AzureRM module, you should update them before 29 February 2024.