Hi , how r u saying there infection below the cavity , if you are saying because if colour , then the teeth cavity might be superficial and u can fill it , since super ficial there is no pain .
But if there swelling or if the nervers inside the tooth are cimoletely dead , then also u won't have pain as nerves are dead , in tat case u gave remove all the soft tissue contents of the tooth and be filled , this procedure s know as Rct( root canal tratment)
Next Steps
go to the nearby dentist and get diagnosed weather superficial or deep , in both cases no need to remove toothso don't worry