You can pass it as a state (I assume post has an id field, feel free to change it if it's not):
<img
onClick={() => navigate("/single", { state: { id: post.id } })}
className="postImages"
src={post.img_url}
alt={post.title}
/>
And grab it in SinglePost with the help of useLocation from React Router Dom:
// import the hook at the top of the component
import {useLocation} from "react-router-dom";
// use it inside the component
const { state } = useLocation();
console.log(state.id);