How to fix indexes to reduce the fragmentation percentage
Check out the IndexOptimize job from Ola Hallengren
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
IndexOptimize is the SQL Server Maintenance Solution’s stored procedure for rebuilding and reorganizing indexes and updating statistics.
Example (Able to run once you've ran MaintenanceSolution.sql from Ola Hallengren)
EXECUTE dbo.IndexOptimize
@Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30