OK @Ashok2 ,
As mentioned free=typed without testing. It seems you cannot refer to a Gallery from inside it, so put this on a Label (I will call it CheckLabel here) and hide it
CountRows(
Filter(
Gallery4.AllItems,
Checkbox4.Value
)
) > 0
Now on the DisplayMode of the CheckBox
If(
CheckLabel.Text = "true" && !ThisItem.IsSelected,
DisplayMode.Disabled,
DisplayMode.Edit
)
I have tested it and it works - you might also consider hiding the boxes (Visible true/false)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.