Custom Dimensions are useful to track any information related to any action or visitors.
If you are using Matomo Cloud, there are typically 15 custom dimensions available for each scope, giving you a total of 30 across both types.
Alternatively, with Matomo On-Premise, there is a default limit of five custom dimensions per scope. However, On-Premise users can increase the number of available Custom Dimensions to allow for up to 50 Dimensions on each scope for a maximum of 100 dimensions total, across both scopes.
It is also worth noting that custom dimension values are each limited to 255 characters in length. You can learn more about data limits in Matomo here.