The paint bucket tool replaces a colour

if i use the paint bucket tool it colours all of that colour eg it replaces all blue with red instead of the specific section

i only have 1 layer and it doesnt matter if it doesnt have any gaps

This is likely because you have Contiguous mode turned off:
paint-bucket-contiguous