Bike build recommendation Im planning to build a gravel bike and I already have the following:

Flared Drop bar
Tiagra STI R7000
10S Deore M4100 Sprocket 11-42
700c Rims
Marin Alps Series Frame

What other components should I buy so that it wouldnt have any problem if I put it in all to my frame?
Im stuck with what RD and Hub should I buy so that it will be compatible to what I already have.
Thank you for your answers!
The Deore M4100 cassette is a 10-speed cassette. It goes to any Shimano splined freehub body but you need an additional 1.85mm spacer if the freehub body is intended for road 11-speed cassettes (MTB 11-speed does not require the spacer). You choose the type of hub based on the frame, for example:

130mm over locknut diameter quick release hub
135mm over locknut diameter quick release hub
142mm M12 thru-axle

Shimano makes many good hubs for all attachments, for both rim and disc brakes. Select the spoke hole count to match your rims. Since you already have the STI shifters, you no longer have the choice of selecting either rim or disc brakes, you must use what you already have. For the front, you have a choice between hub dynamo or no hub dynamo; as a user of a hub dynamo I can heavily recommend it.
Are your shifters R7000 (meaning they'd be 105) or Tiagra (meaning they'd probably be 4700)? R7000 shifters are 11 speeds so not compatible with a 10-speed cassette so you have to change either the cassette or the shifters; changing the cassette is cheaper. 4700 is compatible with a 10-speed cassette but requires a rear derailleur intended for the standard 11-speed cable pull ratio. So I suspect the rear derailleur should use the Shimano road 11-speed pull ratio.