Before you drill or nail into a wall or floor, check there is no wire or pipe there.
Find the supports in a stud wall so your shelf does not fall off.
https://tradestrainingcentre.co.uk/how-to-use-a-cable-detector-before-drilling/
https://www.youtube.com/watch?v=JMAjWk1t6AA
Location code: B5