Hey there! :)
Before we go right into finding the commonalities of both the fourth and eighth amendment, we must first know what they are!
The fourth amendment states that unreasonable searches through either your home, apartment, buildings, or automobiles are not allowed! Law enforcement and government officials must first obtain a search warrant before doing so. In short - you can't have your things searched through unless the person searching has a search warrant.
The eighth amendment states that government officials and law enforcement cannot force you to pay unreasonably high charges against anything, and cruel/unusual punishments aren't allowed! All fines that need to legally be paid must be fair and at a reasonable price, all charges must be fair, and any punishments must NOT be cruel.
Both of these amendments have to do with criminal law! Criminals usually have to be searched, hence the fourth amendment, and they also receive punishments for what they've done, hence the eighth amendment,
~Hope I helped!~